PHPackages                             amund/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. [Templating &amp; Views](/categories/templating)
4. /
5. amund/html

ActiveLibrary[Templating &amp; Views](/categories/templating)

amund/html
==========

A PHP library for generating HTML content from PHP arrays.

1.0.5(3mo ago)0114MITPHPPHP &gt;=8.0

Since Apr 20Pushed 3mo ago1 watchersCompare

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

READMEChangelogDependencies (2)Versions (7)Used By (0)

[![GitHub Tag](https://camo.githubusercontent.com/5581540926fd5b47f55fd1fdac81e32ae49e897c7d6077a3b5f9fe862f3260e6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f416d756e642f68746d6c)](https://camo.githubusercontent.com/5581540926fd5b47f55fd1fdac81e32ae49e897c7d6077a3b5f9fe862f3260e6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f416d756e642f68746d6c)[![Packagist Version](https://camo.githubusercontent.com/542309d0ba423faa8f6f8774e2f7be712d817b37bac9298fe73f0cac97c04f64/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616d756e642f68746d6c)](https://camo.githubusercontent.com/542309d0ba423faa8f6f8774e2f7be712d817b37bac9298fe73f0cac97c04f64/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616d756e642f68746d6c)

PHP HTML Library
================

[](#php-html-library)

A PHP library for generating HTML content from PHP arrays.

Installation
------------

[](#installation)

```
composer require amund/html
```

Usage
-----

[](#usage)

### Generating single tags

[](#generating-single-tags)

Use the `tag` method to generate single HTML tags.

```
echo html::tag('div', ['class'=>'test'], 'Hello World');

// Output: Hello World
```

### Rendering HTML content

[](#rendering-html-content)

Use the `render` method to render HTML content from an array.

```
$data = [
    'tag' => 'div',
    'class' => 'test',
    'content' => [
        'Hello ',
        [
            'tag'=>'b',
            'content'=>'World'
        ],
        ' !',
    ],
];

echo html::render($data);

// Output: Hello World !
```

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance78

Regular maintenance activity

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~56 days

Recently: every ~70 days

Total

6

Last Release

114d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/16551810b8c56652cdcf583129be4fa53502818c9a0c5122960ccbce48132720?d=identicon)[Amund](/maintainers/Amund)

---

Top Contributors

[![Amund](https://avatars.githubusercontent.com/u/121880?v=4)](https://github.com/Amund "Amund (6 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)[symfony/ux-icons

Renders local and remote SVG icons in your Twig templates.

555.8M69](/packages/symfony-ux-icons)

PHPackages © 2026

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