PHPackages                             ui-awesome/html-helper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ui-awesome/html-helper

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ui-awesome/html-helper
======================

UI Awesome HTML Helpers Library for PHP.

0.7.2(3mo ago)141.9k↑33.3%7BSD-3-ClausePHPPHP ^8.1CI passing

Since Mar 6Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/ui-awesome/html-helper)[ Packagist](https://packagist.org/packages/ui-awesome/html-helper)[ RSS](/packages/ui-awesome-html-helper/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (32)Used By (7)

    ![UI Awesome](https://raw.githubusercontent.com/ui-awesome/.github/refs/heads/main/logo/ui_awesome_dark.png)

Html helper
===========

[](#html-helper)

 [ ![PHPUnit](https://camo.githubusercontent.com/bbb461d41bc22ca45d6a8495dc3b08bbb912b5b1f3e5f7d7eee502c18c3feb68/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f75692d617765736f6d652f68746d6c2d68656c7065722f6275696c642e796d6c3f7374796c653d666f722d7468652d6261646765266c6162656c3d504850556e6974266c6f676f3d676974687562) ](https://github.com/ui-awesome/html-helper/actions/workflows/build.yml) [ ![Mutation Testing](https://camo.githubusercontent.com/bd659de58e67150ac09717341050035f34a927d5a2f430cd7cbdd40bc9178e0f/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666f722d7468652d62616467652675726c3d687474707325334125324625324662616467652d6170692e737472796b65722d6d757461746f722e696f2532466769746875622e636f6d25324675692d617765736f6d6525324668746d6c2d68656c7065722532466d61696e) ](https://dashboard.stryker-mutator.io/reports/github.com/ui-awesome/html-helper/main) [ ![PHPStan](https://camo.githubusercontent.com/0c2c81f56941fa83150f60fd97c495d1e66c6fd69960d51a585f186a38b79988/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f75692d617765736f6d652f68746d6c2d68656c7065722f7374617469632e796d6c3f7374796c653d666f722d7468652d6261646765266c6162656c3d5048505374616e266c6f676f3d676974687562) ](https://github.com/ui-awesome/html-helper/actions/workflows/static.yml)

 **A powerful PHP library to simplify HTML element creation**
 *Generate attributes, encode content, sanitize HTML, and manage CSS classes with ease.*

Features
--------

[](#features)

  ![Feature Overview](./docs/svgs/features-mobile.svg)### Installation

[](#installation)

```
composer require ui-awesome/html-helper:^0.5
```

### Quick start

[](#quick-start)

#### Attribute key normalization

[](#attribute-key-normalization)

Ensures attribute keys have the correct prefix (like `aria-`, `data-`, or `on`), supporting strings, Enums, and Stringables.

```
