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

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

xiphe/html
==========

PHP-based HTML Markup generator

2.0.10(13y ago)33[1 issues](https://github.com/Xiphe/HTML/issues)GNU GENERAL PUBLIC LICENSEPHPPHP &gt;=5.3

Since Jan 8Pushed 12y ago2 watchersCompare

[ Source](https://github.com/Xiphe/HTML)[ Packagist](https://packagist.org/packages/xiphe/html)[ Docs](https://github.com/Xiphe/HTML)[ RSS](/packages/xiphe-html/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (13)Used By (0)

HTML - a PHP-based HTML Markup generator
========================================

[](#html---a-php-based-html-markup-generator)

The main benefits are:

- no switching between php and html or echoing of html strings needed when you are inside your php stuff.
- Minimalistic usage attempt and helper functions. You should be able to generate more html markup with less php instructions while keeping full flexibility.
- Auto-indention. Unless you turn it of to save whitespace you will receive beautifully indented and super-readable markup for your web-projects.

The main downfalls are:

- Page generation takes longer, because every html-tag will run through a lot of php functions while being generated.
    (I use it along with wordpress and can not make a humanly noticeable difference in page loading speed when changing from a default wp-theme to one that uses the generator.)
- It may be difficult to learn how to use this, compared to writing pure html.

This project is inspired by the [CakePHP HtmlHelper](http://api.cakephp.org/class/html-helper).

[Demo-/Testpage](http://html.xiphe.net/demo/)
[Documentation(phpDocumentor)](http://html.xiphe.net/doc/)

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

[](#installation)

### Wordpress

[](#wordpress)

1. Download the [latest "alldeps" branch](https://github.com/Xiphe/HTML/archive/alldeps.zip)
2. Extract the archive and upload the plugin into the `/wp-content/plugins/` directory of your wordpress project.
3. Activate the plugin through the 'Plugins' menu in WordPress

### Standalone

[](#standalone)

Use [composer](http://getcomposer.org/) and require `"xiphe/html": "2.0.*"`

or download the [latest "alldeps" branch](https://github.com/Xiphe/HTML/archive/alldeps.zip), extract it and put it anywhere in your php project. Then include `[path to]/bootstrap.php` or `[path to]/vendor/autoload.php`.

Basic Usage
-----------

[](#basic-usage)

Follow the [Installation](https://github.com/Xiphe/HTML#installation) steps to initiate the global $HTML variable.

```
