Skip to content


Subversion checkout URL

You can clone with
Download ZIP
filtered branch of html5lib
Tree: 1c9c13c66d

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


html5lib is a pure-python library for parsing HTML. It is designed to
conform to the HTML 5 specification, which has formalized the error handling
algorithms of popular web browsers.

 = Installation =

html5lib is packaged with distutils. To install it use:
 $ python install

 = Tests =

You may wish to check that your installation has been a success by
running the testsuite. All the tests can be run by invoking in the html5lib/tests/ directory

 = Usage =

Simple usage follows this pattern:

import html5lib
f = open("mydocument.html")
parser = html5lib.HTMLParser()
document = parser.parse(f)

More documentation is avaliable in the docstrings or from

 = Bugs =

Please report any bugs on the issue tracker:

 = Get Involved =

Contributions to code or documenation are actively encouraged. Submit
patches to the issue tracker or discuss changes on irc in the #whatwg
channel on

Something went wrong with that request. Please try again.