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

ActiveLibrary

ht7/ht7-html
============

A PHP library to build HTML with OOP.

00[14 issues](https://github.com/1stthomas/ht7-html/issues)[1 PRs](https://github.com/1stthomas/ht7-html/pulls)PHP

Since Nov 4Pushed 1y ago1 watchersCompare

[ Source](https://github.com/1stthomas/ht7-html)[ Packagist](https://packagist.org/packages/ht7/ht7-html)[ RSS](/packages/ht7-ht7-html/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Ht7 - Html
==========

[](#ht7---html)

Abstract
--------

[](#abstract)

How to use it
-------------

[](#how-to-use-it)

```
use \Ht7\Html\Tag;

$tag = new Tag('div', ['inner text.'], ['id' => 'ht7-inner-1', 'class' => 'inner']);
echo $tag;
// output: inner text.
```

While there is no way to add attributes directly to `Tag` instance, you need to gain the attribute list first. After that you can add further attributes to the attribute list. At the end there is no need to readd the attribute list again, because it was given by reference.

```
use \Ht7\Html\Attribute;

$aL = $tag->getAttributes();
$aL->addPlain($name, $value);
// or:
$aL->add((new Attribute($name, $value)));
```

Method chainning is also supported:

```
$tag->getAttributes()
    ->addPlain($name1, $value1)
    ->addPlain($name2, $value2);
```

Testing
-------

[](#testing)

Trigger the unit tests with following CLI command:

```
$ composer test-unit

```

or run the functional tests by:

```
$ composer test-func

```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity30

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/6e811b0207ba5d848b01d2b0f834793935533490df4f9849d1e15a71b41bb13f?d=identicon)[1stthomas](/maintainers/1stthomas)

---

Top Contributors

[![1stthomas](https://avatars.githubusercontent.com/u/17023096?v=4)](https://github.com/1stthomas "1stthomas (53 commits)")

### Embed Badge

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

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

PHPackages © 2026

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