# HTML5-PHP HTML5 is a standards-compliant HTML5 parser and writer written entirely in PHP with well over [one million downloads](https://packagist.org/packages/masterminds/html5). HTML5 is stable and used in many large production sites. It supports the following features: - An HTML5 serializer - Support for PHP namespaces - Composer support - Event-based (SAX-like) parser - DOM tree builder - Interoperability with [QueryPath](https://github.com/technosophos/querypath) - Runs on **PHP** 5.3.0 or newer and **HHVM** 3.2 or newer [![Build Status](https://travis-ci.org/Masterminds/html5-php.png?branch=master)](https://travis-ci.org/Masterminds/html5-php) [![Latest Stable Version](https://poser.pugx.org/masterminds/html5/v/stable.png)](https://packagist.org/packages/masterminds/html5) [![Code Coverage](https://scrutinizer-ci.com/g/Masterminds/html5-php/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/Masterminds/html5-php/?branch=master) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/Masterminds/html5-php/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/Masterminds/html5-php/?branch=master) [![Stability: Sustained](https://masterminds.github.io/stability/sustained.svg)](https://masterminds.github.io/stability/sustained.html) ## Installation Install HTML5-PHP using [composer](http://getcomposer.org/). To install, add `masterminds/html5` to your `composer.json` file: ``` { "require" : { "masterminds/html5": "2.*" }, } ``` (You may substitute `2.*` for a more specific release tag, of course.) From there, use the `composer install` or `composer update` commands to install. ## 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.