PHPackages                             xana/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. xana/gen-html

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

xana/gen-html
=============

This library make generating HTML contents easier than ever

1.0.2.8(1y ago)24LGPL-3.0-or-laterPHPPHP ^8

Since Mar 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/omediadon/HTML-Gen)[ Packagist](https://packagist.org/packages/xana/gen-html)[ RSS](/packages/xana-gen-html/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (9)Used By (0)

[![Downloads](https://camo.githubusercontent.com/5b553c01fe4c076a658849fd6b04cc9ed782384bcf90bedb43976c26605610e6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f78616e612f67656e2d68746d6c2e7376673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/xana/gen-html)[![Contributors](https://camo.githubusercontent.com/7532dbb2a17a1fe2e50f1c9c3502c4e1e92be51b8633bcd66c47d2ebc2300641/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f6f6d65646961646f6e2f48544d4c2d47656e2e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/omediadon/HTML-Gen/graphs/contributors)[![Forks](https://camo.githubusercontent.com/d1194b3fd4d5fb2a6272aa1b8d9db4a5daabf39e310003e6058ba5f2f3011bd7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6f6d65646961646f6e2f48544d4c2d47656e2e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/omediadon/HTML-Gen/network/members)[![Stargazers](https://camo.githubusercontent.com/a5ffb9fc0e8dee42bfdb0b70156a4b2f9ce05406ddb4729e2000f7dc7f69a612/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6f6d65646961646f6e2f48544d4c2d47656e2e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/omediadon/HTML-Gen/stargazers)[![Issues](https://camo.githubusercontent.com/36c7bdbcb06033b76ee8df9409d1c5a7aaa78c4183050c820ad334c064b9be51/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6f6d65646961646f6e2f48544d4c2d47656e2e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/omediadon/HTML-Gen/issues)[![MIT License](https://camo.githubusercontent.com/4965e9082d55d3586e0ee5675661746694f6ad06d6c30c6c7b3d0c3a6689dff7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6f6d65646961646f6e2f48544d4c2d47656e2e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/omediadon/HTML-Gen/blob/master/LICENSE)[![LinkedIn](https://camo.githubusercontent.com/d52963778220cbec61d6ed72270f9735024ffceeb551e5c3933d4e03b4694cf1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d4c696e6b6564496e2d626c61636b2e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d6c696e6b6564696e26636f6c6f72423d353535)](https://www.linkedin.com/in/omar-sakhraoui)

 [ ![image](https://camo.githubusercontent.com/955471e91a0134b542618de07c7668635007d96dd4ef854934a0869df4d0aed2/68747470733a2f2f7777772e7376677265706f2e636f6d2f73686f772f3533303434342f617661696c6162696c6974792e737667) ](https://github.com/omediadon/HTML-Gen)### HTML GEN

[](#html-gen)

 *Generate your HTML securely, with ease!*
 [**Explore the docs »**](https://github.com/omediadon/HTML-Gen)

 [Report Bug](https://github.com/omediadon/HTML-Gen/issues) · [Request Feature](https://github.com/omediadon/HTML-Gen/issues)

Table of Contents- [About The Project](#about-the-project)
    - [Supports](#supports)
- [Getting Started](#getting-started)
    - [Prerequisites](#prerequisites)
    - [Installation](#installation)
- [Usage](#usage)
- [Contact](#contact)
- [Additional documentation](#additional-documentation)

About The Project
-----------------

[](#about-the-project)

*This is a library that does just that; generates HTML markdown using fluent PHP classes. This library can be used anywhere where you can have PHP and HTML coexist. Worth noting, this library was made ***just for fun***.*

([back to top](#top))

### Supports:

[](#supports)

1. HTML Elements
    - `Divs`
    - `Paragraphs`
    - `Images`
    - `Links`
    - `Inputs (text, mail, phone, passwoord, date, file, select...)`
    - `Tables (row, columns, header...)`
    - `Forms`
    - `Headings`
    - `Lists (ordered and unordered)`
    - `Line break`
2. CSS Framework
    - `Bootstrap 5`

([back to top](#top))

Getting Started
---------------

[](#getting-started)

To set up a local instance of the application, follow the steps below.

### Prerequisites

[](#prerequisites)

The following dependencies are required to be installed for the project to function properly:

- PHP 8+
- Composer

([back to top](#top))

### Installation

[](#installation)

*Now that the environment has been set up and configured to properly compile and run the project, the next step is to install and configure the project locally on your system.*

1. Install the library

```
composer require xana/gen-html
```

2. Have fun!

([back to top](#top))

Usage
-----

[](#usage)

Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space.

```

use Xana\GenHtml\Elements\Button;
use Xana\GenHtml\Elements\Email;
use Xana\GenHtml\Elements\Form;
use Xana\GenHtml\Elements\Password;
use Xana\GenHtml\Elements\TextArea;

require 'vendor/autoload.php';

$paragraphWithInlineLink = new Paragraph('A paragraph, but you can click {here} to visit example.com');

$paragraphWithInlineLink->addInlineElement('here', new link('//example.com', 'here'));

$paragraphWithInlineLink->render();

$defaultAttrs = [
  "required" => true,
  'placeholder' => 'Enter your message here',
];
$form = $form->addElement(new Email("email", ["placeholder" => "Email Address", 'class'=>'bg-info'])->keepDefaultClasses())
           ->addElement(new Password("password", ["placeholder" => "Password"]))
           ->addElement(new TextArea('the-text', $defaultAttrs))
           ->addElement(new Button("Login"));

echo $form->render();
```

([back to top](#top))

Contact
-------

[](#contact)

📫 Omar SAKHRAOUI ( aka Xana )

- [![View my website ](https://camo.githubusercontent.com/35d7d2bd20755149ff88bc93abe4be765212da994b6cd641f244f486a79271e1/68747470733a2f2f7777772e7376677265706f2e636f6d2f73686f772f3334353337362f776562736974652d736974652d6865616c74682d6d65646963616c2d647275672d706861726d6163792d7765622e737667) View my website ](https://xanaserver.cloud)

- [![Send an EMail](https://raw.githubusercontent.com/edent/SuperTinyIcons/master/images/svg/mail.svg) Send an EMail ](mailto:webmaster@xanaserver.cloud)

- [![My LinkedIn](https://raw.githubusercontent.com/edent/SuperTinyIcons/master/images/svg/linkedin.svg) Hire me on LinkedIn ](https://www.linkedin.com/in/omar-sakhraoui/)

([back to top](#top))

Additional documentation
------------------------

[](#additional-documentation)

- [Changelogs](/CHANGELOG.md)
- [License](/LICENSE)

([back to top](#top))

Made with 💕
-----------

[](#made-with-)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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 ~26 days

Recently: every ~39 days

Total

7

Last Release

649d ago

PHP version history (2 changes)1.0.0PHP &gt;=8.1

1.0.1.1PHP ^8

### Community

Maintainers

![](https://www.gravatar.com/avatar/7ab944c5b0be0566e4193d55d7f3d8c4f868631be09e26055a02fa0ff0bd32ff?d=identicon)[omediadon](/maintainers/omediadon)

---

Top Contributors

[![FallegaHQ](https://avatars.githubusercontent.com/u/15385929?v=4)](https://github.com/FallegaHQ "FallegaHQ (90 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

PHPackages © 2026

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