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

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

waughj/html-tag
===============

Simple class for generating HTML tag.

v0.1.0(6y ago)0512AGPL-3.0-or-laterPHPPHP &gt;=7.2

Since Sep 10Pushed 6y ago1 watchersCompare

[ Source](https://github.com/waughjai/html-tag)[ Packagist](https://packagist.org/packages/waughj/html-tag)[ RSS](/packages/waughj-html-tag/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (2)

HTML Tag
========

[](#html-tag)

Simple class for generating HTML tag.

Use
---

[](#use)

This class's constructor takes 3 arguments, 2 of which are optional:

1. The tag name (string)
2. A list of attributes (associative array)
3. Content (anything that can be converted into a string, including other HTMLTag instances)

Example
-------

[](#example)

```
use WaughJ\HTMLTag\HTMLTag;

echo new HTMLTag
(
    'div',
    [ 'class' => 'main' ],
    new HTMLTag
    (
        'img',
        [ 'src' => 'image.gif' ]
    )
);

```

will generate:

```

```

Changelog
---------

[](#changelog)

### 0.1.0

[](#010)

- Initial Release

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2439d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11161078?v=4)[waughj](/maintainers/waughj)[@waughj](https://github.com/waughj)

---

Tags

htmltag

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-html

A fluent html builder

8376.4M72](/packages/spatie-laravel-html)[caxy/php-htmldiff

A library for comparing two HTML files/snippets and highlighting the differences using simple HTML.

21520.9M15](/packages/caxy-php-htmldiff)[yajra/laravel-datatables-html

Laravel DataTables HTML builder plugin

2899.6M48](/packages/yajra-laravel-datatables-html)[voku/html-min

HTML Compressor and Minifier

1804.7M39](/packages/voku-html-min)[mkalkbrenner/php-htmldiff-advanced

An add-on for the php-htmldiff library for comparing two HTML files/snippets and highlighting the differences using simple HTML.

3517.8M1](/packages/mkalkbrenner-php-htmldiff-advanced)

PHPackages © 2026

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