Skip to content
Dart port of html5lib. For parsing HTML/HTML5 with Dart. Works in the client and on the server.
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib Code cleanup (#96) Apr 11, 2019
test Don't depend on `pacakge:utf` (#95) Apr 9, 2019
.gitignore update the changelog Mar 10, 2018
.travis.yml Remove support for deprecated encodings and parser_console.dart libra… Apr 8, 2019
LICENSE Remove broken link from readme Apr 5, 2019
analysis_options.yaml fix tiny lint issues Mar 4, 2019
pubspec.yaml Support the latest pkg:csslib, prepare to release 0.14.0+1 Apr 11, 2019

This is a pure Dart HTML5 parser. It's a port of html5lib from Python.


Parsing HTML is easy!

import 'package:html/parser.dart' show parse;
import 'package:html/dom.dart';

main() {
  var document = parse(
      '<body>Hello world! <a href="">HTML5 rocks!');

You can pass a String or list of bytes to parse. There's also parseFragment for parsing a document fragment, and HtmlParser if you want more low level control.

You can’t perform that action at this time.