Skip to content

rocketphp/html

Repository files navigation

html

Build Status Coverage Status Dependency Status

Latest Stable Version License

This is a forkable respository

RocketPHP\HTML is a component for object oriented HTML generation.

To construct HTML – start with an instance of HTML and add tags by accessing the tag’s method on that object.

use RocketPHP\HTML\HTML;

$h = new HTML();
$div = $h->div('id="foo" class="bar"');
$div->p('Hello, World!');
echo $h;
<div id="foo" class="bar">
  <p>
    Hello, World!
  </p>
</div>