Chris@0: # HTML5-PHP Chris@0: Chris@0: HTML5 is a standards-compliant HTML5 parser and writer written entirely in PHP. Chris@0: It is stable and used in many production websites, and has Chris@0: well over [one million downloads](https://packagist.org/packages/masterminds/html5). Chris@0: Chris@0: HTML5 provides the following features. Chris@0: Chris@0: - An HTML5 serializer Chris@0: - Support for PHP namespaces Chris@0: - Composer support Chris@0: - Event-based (SAX-like) parser Chris@0: - A DOM tree builder Chris@0: - Interoperability with [QueryPath](https://github.com/technosophos/querypath) Chris@0: - Runs on **PHP** 5.3.0 or newer and **HHVM** 3.2 or newer Chris@0: Chris@0: [](https://travis-ci.org/Masterminds/html5-php) Chris@0: [](https://packagist.org/packages/masterminds/html5) Chris@0: [](https://scrutinizer-ci.com/g/Masterminds/html5-php/?branch=master) Chris@0: [](https://scrutinizer-ci.com/g/Masterminds/html5-php/?branch=master) Chris@0: [](https://masterminds.github.io/stability/sustained.html) Chris@0: Chris@0: ## Installation Chris@0: Chris@0: Install HTML5-PHP using [composer](http://getcomposer.org/). Chris@0: Chris@0: To install, add `masterminds/html5` to your `composer.json` file: Chris@0: Chris@0: ```json Chris@0: { Chris@0: "require" : { Chris@0: "masterminds/html5": "2.*" Chris@0: }, Chris@0: } Chris@0: ``` Chris@0: Chris@0: (You may substitute `2.*` for a more specific release tag, of Chris@0: course.) Chris@0: Chris@0: From there, use the `composer install` or `composer update` commands to Chris@0: install. Chris@0: Chris@0: ## Basic Usage Chris@0: Chris@0: HTML5-PHP has a high-level API and a low-level API. Chris@0: Chris@0: Here is how you use the high-level `HTML5` library API: Chris@0: Chris@0: ```php Chris@0: Chris@0:
Chris@0:This is a test of the HTML5 parser.
Chris@0: Chris@0: