PHPackages                             hypertool/html - 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. hypertool/html

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

hypertool/html
==============

A comprehensive PHP library for generating HTML elements with HTMX and Hyperscript support.

11PHPCI passing

Since Apr 13Pushed 1y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

HTML Element Generator
======================

[](#html-element-generator)

This PHP class provides a convenient way to generate HTML elements with attributes and child elements. It supports creating a variety of HTML tags and setting attributes using a fluent interface.

Usage
-----

[](#usage)

1. Include the `HtmlElement` class in your PHP code.
2. Create an instance of the `HtmlElement` class to generate HTML elements.
3. Use the various methods provided by the class to set attributes, add child elements, and modify properties.
4. Output the generated HTML using the `output()` method.

### Creating and Modifying HTML Elements

[](#creating-and-modifying-html-elements)

```
// Create an HTML element
$html = new HtmlElement('div');
$html->setId('myDiv')->setClass('some-class');

// Add child elements and modify them
$html->add_child('MainTitle','h1')->text('Hello, World!')->setClass('title');

// Modify the child element using a fluent interface
$html->MainTitle->setStyle('color: blue;');

// Output the HTML
echo $html->output();
```

TO DO:
------

[](#to-do)

- Finish the implementation of all html tags.
- Add support for [HTMX](https://htmx.org/).
- Add support for [Hyperscript](https://hyperscript.org/).
- Add suport for Css frameworks like bootstrap or tailwind.

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/5c84b643bae0caee282cb5cb88c300aab800afbed904c459e9fcad4e493a3850?d=identicon)[kuasarx](/maintainers/kuasarx)

---

Top Contributors

[![kuasarx](https://avatars.githubusercontent.com/u/34275535?v=4)](https://github.com/kuasarx "kuasarx (3 commits)")

---

Tags

htmlhtml5htmxhyperscriptphp-library

### Embed Badge

![Health badge](/badges/hypertool-html/health.svg)

```
[![Health](https://phpackages.com/badges/hypertool-html/health.svg)](https://phpackages.com/packages/hypertool-html)
```

###  Alternatives

[carlcs/craft-deleteentryversions

Delete Entry Versions plugin for Craft CMS

2613.6k](/packages/carlcs-craft-deleteentryversions)[crisen/ai

优雅的ai客户端

265.5k1](/packages/crisen-ai)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
