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

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

effectra/html-render
====================

The Effectra Html Render package.

v1.0.0(3y ago)05MITPHPPHP ^8.0.2

Since May 26Pushed 3y agoCompare

[ Source](https://github.com/effectra/html-render)[ Packagist](https://packagist.org/packages/effectra/html-render)[ RSS](/packages/effectra-html-render/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependenciesVersions (2)Used By (0)

Effectra HTML Render
====================

[](#effectra-html-render)

Effectra HTML Render is a PHP library that provides a set of classes for generating and manipulating HTML elements in an object-oriented manner.

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

[](#installation)

You can install the package via Composer. Run the following command in your terminal:

```
composer require effectra/html-render
```

Usage
-----

[](#usage)

### Creating HTML Elements

[](#creating-html-elements)

The `HtmlElement` class allows you to create HTML elements with different tags, content, and attributes. Here's an example of how to create an HTML element:

```
use Effectra\HtmlRender\HtmlElement;

// Create an HTML element with a  tag and some content
$element = new HtmlElement('This is a div element', 'div');

// Get the content of the HTML element
$content = $element->getContent();
echo $content; // Output: This is a div element

// Get the tag name of the HTML element
$tag = $element->getTag();
echo $tag; // Output: div

// Get all attributes of the HTML element
$attributes = $element->getAttributes();
print_r($attributes); // Output: []

// Set the content of the HTML element and create a new instance
$newElement = $element->withContent('New content');
```

### Generating HTML Tags

[](#generating-html-tags)

The `Render` class provides static methods for generating common HTML tags. Here are some examples:

```
use Effectra\HtmlRender\Render;

// Generate the HTML  tag
$htmlTag = Render::tagHtml('Content', 'en');

// Generate the HTML  tag
$headTag = Render::tagHead('Head content');

// Generate the HTML  tag
$bodyTag = Render::tagBody('Body content');

// Generate the HTML  tag
$titleTag = Render::tagTitle('Page Title');
```

### Using the HTML Element Factory

[](#using-the-html-element-factory)

The `HtmlElementFactory` class is a factory for creating instances of the `HtmlElement` class. Here's an example:

```
use Effectra\HtmlRender\Factory\HtmlElementFactory;

$factory = new HtmlElementFactory();

// Create an HTML element using the factory
$element = $factory->createHtmlElement('Element content', 'span', ['class' => 'highlight']);

// Get the content of the created element
$content = $element->getContent();
echo $content; // Output: Element content
```

Contributing
------------

[](#contributing)

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.

License
-------

[](#license)

This package is open-source and licensed under the MIT License. See the [LICENSE](LICENSE) file for more information.

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

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

1134d ago

### Community

Maintainers

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

---

Top Contributors

[![BMTmohammedtaha](https://avatars.githubusercontent.com/u/95439605?v=4)](https://github.com/BMTmohammedtaha "BMTmohammedtaha (3 commits)")

### Embed Badge

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

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

###  Alternatives

[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3851.2M](/packages/limenius-react-bundle)[area17/laravel-auto-head-tags

Laravel Auto Head Tags helps you build the list of head elements for your app

4616.1k](/packages/area17-laravel-auto-head-tags)[jelix/wikirenderer

WikiRenderer is a library to generate HTML or anything else from wiki content.

1712.3k1](/packages/jelix-wikirenderer)[webkinder/sproutset

A Composer package for handling responsive images in Roots Bedrock + Sage + Blade projects.

282.2k](/packages/webkinder-sproutset)

PHPackages © 2026

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