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@17: well over [five 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@17: By adding the `masterminds/html5` dependency to your `composer.json` file: Chris@0: Chris@0: ```json Chris@0: { Chris@0: "require" : { Chris@17: "masterminds/html5": "^2.0" Chris@0: }, Chris@0: } Chris@0: ``` Chris@0: Chris@17: By invoking require command via composer executable: Chris@0: Chris@17: ```bash Chris@17: composer require masterminds/html5 Chris@17: ``` 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: