#Canteen HTML5 Create dynamic, well-formatted HTML5 markup with a simple an intuitive PHP API. This is a fork/rewrite of the [Gagawa](https://code.google.com/p/gagawa/) project. CanteenHTML5 is a concise, flexible and easy to remember API which makes it possible to create simple markup (such as a link) or more complex structures (such a table, document or nested list). All tags and attribute names are validated against the current HTML5 specification. For documentation of the codebase, please see [Canteen HTML5 docs](http://canteen.github.io/CanteenHTML5/). ##Requirements This library requires a webserver running PHP 5.3+. Also, the root namespace for the library is `Canteen\HTML5`. ##Installation Install is available using [Composer](http://getcomposer.org). ```bash composer require canteen/html5 dev-master ``` Including using the Composer autoloader. ```php require 'vendor/autoload.php'; ``` ##Usage ###Basic To create an HTML node, simply call global `html` method, passing in the tag name and then any attributes. ```php // Enable the global use of html() Canteen\HTML5\HTML5::useGlobal(); // Turn on autoloading if not using composer's autoloading Canteen\HTML5\HTML5::autoload(); echo html('img src=home.jpg'); echo html('img', 'src=home.jpg'); echo html('img', array('src'=>'home.jpg')); ``` All of these examples would output: ```html ``` ###Adding Attributes There are dfferent ways to add attributes for HTML container nodes such as `

`, `

`, or in the example below, `