Search by

jamesthe1 / mini-html-builder

jamesthe1

A miniature HTML builder.

Package info

github.com/Jamesthe1/html-builder

Homepage

pkg:composer/jamesthe1/mini-html-builder

Statistics

Installs: 8

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v3.0.0 2026-10-22 18:29 UTC

This package is auto-updated.

Last update: 2026-10-22 18:31:48 UTC


README

This composer package creates a simple HTML builder for PHP.

API

The API can be found in the single builder.php file, as it contains detailed doc comments in the form of DocBlocks.

Example

use HTMLBuild\Helpers;
use HTMLBuild\html_element;

$htmlroot = Helpers::html_quick_setup("My website", "./favicon.ico", "./style.css");
$body = $htmlroot->get_child_by_tag("body"); // All objects are passed by reference.
$body->add_child(new html_element("p", "Hello world!", $attributes = [
    'class' = 'main-text',
    'id' = 'first-text'
]));

Helpers::html_print($htmlroot);