# HTML5-PHP HTML5 is a standards-compliant HTML5 parser and writer written entirely in PHP. It is stable and used in many production websites, and has well over [five million downloads](https://packagist.org/packages/masterminds/html5). HTML5 provides the following features. - An HTML5 serializer - Support for PHP namespaces - Composer support - Event-based (SAX-like) parser - A DOM tree builder - Interoperability with [QueryPath](https://github.com/technosophos/querypath) - Runs on **PHP** 5.3.0 or newer [](https://travis-ci.org/Masterminds/html5-php) [](https://packagist.org/packages/masterminds/html5) [](https://scrutinizer-ci.com/g/Masterminds/html5-php/?branch=master) [](https://scrutinizer-ci.com/g/Masterminds/html5-php/?branch=master) [](https://masterminds.github.io/stability/sustained.html) ## Installation Install HTML5-PHP using [composer](http://getcomposer.org/). By adding the `masterminds/html5` dependency to your `composer.json` file: ```json { "require" : { "masterminds/html5": "^2.0" }, } ``` By invoking require command via composer executable: ```bash composer require masterminds/html5 ``` ## Basic Usage HTML5-PHP has a high-level API and a low-level API. Here is how you use the high-level `HTML5` library API: ```php
This is a test of the HTML5 parser.