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

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

abgeo/gen-html
==============

Library for generating HTML document

v0.9(6y ago)5392[1 PRs](https://github.com/ABGEO/gen-html/pulls)MITPHP

Since Jul 29Pushed 5y agoCompare

[ Source](https://github.com/ABGEO/gen-html)[ Packagist](https://packagist.org/packages/abgeo/gen-html)[ Docs](https://github.com/ABGEO07/gen-html)[ RSS](/packages/abgeo-gen-html/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)DependenciesVersions (3)Used By (0)

gen-html
========

[](#gen-html)

PHP Library for generating HTML document

[![GitHub license](https://camo.githubusercontent.com/355849edaff3afc882fc9d374b855a9d65ee46b29a0de9c76822966afa957a11/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f414247454f30372f67656e2d68746d6c2e737667)](https://github.com/ABGEO07/gen-html/blob/master/LICENSE)

[![GitHub release](https://camo.githubusercontent.com/a3aa3a34a1c01273d7ea00d436b048297a4395783cf918df7434f8438eb49fab/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f414247454f30372f67656e2d68746d6c2e737667)](https://github.com/ABGEO07/gen-html/releases)

[![Packagist Version](https://camo.githubusercontent.com/3d069ba37274a9cd3e4ed3a48d27f6aa091ff10e2c996b66ecfa83147ca621fc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616267656f2f67656e2d68746d6c2e737667 "Packagist Version")](https://packagist.org/packages/abgeo/gen-html "Packagist Version")

---

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

[](#installation)

You can install this library with [Composer](https://getcomposer.org/):

- `composer require abgeo/gen-html`

Usage
-----

[](#usage)

Include composer autoloader in your main file (Ex.: index.php)

- `require_once __DIR__ . '/../vendor/autoload.php';`

### Classes

[](#classes)

The library has two classes:

- `\ABGEO\HTMLGenerator\Document` - For generating Full HTML5 Document;
- `\ABGEO\HTMLGenerator\Element` - For generating HTML element;

#### Class `Document`

[](#class-document)

Import `ABGEO\HTMLGenerator\Document` class.

##### Public Methods

[](#public-methods)

- `setLanguage()` - Set document content language (Document::LANG\_\* constants);
- `setCharset()` - Set charset for document (Document::CHARSET\_\* constants);
- `setTitle()` - Set Document title;
- `setDescription()` - Set Document description;
- `setKeywords()` - Set Document keywords;
- `addStyle()` - Add CSS file path;
- `setBody()` - Set Document body content;
- `addScript()` - Set JS file path;
- `getDocument()` - Get generated HTML code;

**Note: See usage in [example.php](examples/example.php)**

#### Class `Element`

[](#class-element)

Import `ABGEO\HTMLGenerator\Element` class.

##### Public Methods

[](#public-methods-1)

- `add2Content()` - Add given string to HTML content;
- `getHtml()` - Get HTML Content;
- `concatenateElements()` - Concatenate given elements;
- `createLink()` - Generate a tag;
- `createArticle()` - Generate article tag;
- `createBlockquote()` - Generate blockquote tag;
- `createBreak()` - Generate br tag;
- `createCode()` - Generate code tag;
- `createDiv()` - Generate div tag;
- `createEm()` - Generate em tag;
- `createForm()` - Generate form tag;
- `createFooter()` - Generate footer tag;
- `createHeading()` - Generate h1-h6 tags;
- `createHeader()` - Generate header tag;
- `createLine()` - Generate hr tag;
- `createI()` - Generate i tag;
- `createImg()` - Generate img tag;
- `createInput()` - Generate input tag;
- `createLabel()` - Generate label tag;
- `createList()` - Generate ol or ul tags;
- `createNav()` - Generate nav tag;
- `createParagraph()` - Generate p tag;
- `createPre()` - Generate pre tag;
- `createProgress()` - Generate progress tag;
- `createSection()` - Generate section tag;
- `createSelect()` - Generate select tag;
- `createSpan()` - Generate span tag;
- `createStrong()` - Generate strong tag;
- `createSub()` - Generate sub tag;
- `createSup()` - Generate sup tag;
- `createTable()` - Generate table tag;
- `createTextarea()` - Generate textarea tag;
- `clear()` - Clear HTML content;

**Note: See usage in [example.php](examples/example.php)**

Examples
--------

[](#examples)

See full example in [example.php](examples/example.php) and sample Bootstrap 4 page in [bootstrap.php](examples/bootstrap.php).

Authors
-------

[](#authors)

- **Temuri Takalandze** - *Initial work* - [ABGEO](https://abgeo.dev)

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Unknown

Total

1

Last Release

2482d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/003cac08dd47c34ad3a5ed454c2968ed6afea9e26d57033867d4166fa08b3555?d=identicon)[ABGEO](/maintainers/ABGEO)

---

Top Contributors

[![ABGEO](https://avatars.githubusercontent.com/u/19558543?v=4)](https://github.com/ABGEO "ABGEO (21 commits)")

---

Tags

phpgeneratorhtml

### Embed Badge

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

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

###  Alternatives

[froala/wysiwyg-editor-php-sdk

PHP SDK for Froala WYSIWYG Editor

431.5M](/packages/froala-wysiwyg-editor-php-sdk)[phug/phug

Pug (ex-Jade) facade engine for PHP, HTML template engine structured by indentation

67292.2k13](/packages/phug-phug)

PHPackages © 2026

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