Clone this repo:
  1. 929b6de Update README.md (#258) by Moritz · 6 months ago main
  2. 6d3bc86 Bump actions/checkout from 4.1.7 to 4.2.0 in the github-actions group (#257) by dependabot[bot] · 7 months ago
  3. 5516387 Drop Pair util class (#255) by Kevin Moore · 8 months ago
  4. 50837e5 Fix doc comments (#256) by Nate Bosch · 8 months ago
  5. 0da420c Bump the github-actions group with 2 updates (#250) by dependabot[bot] · 10 months ago

[!IMPORTANT]
This repo has moved to https://github.com/dart-lang/tools/tree/main/pkgs/html

Dart CI pub package package publisher

A Dart implementation of an HTML5 parser.

Usage

Parsing HTML is easy!

import 'package:html/parser.dart';

void main() {
  var document = parse(
      '<body>Hello world! <a href="www.html5rocks.com">HTML5 rocks!');
  print(document.outerHtml);
}

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.

Background

This package was a port of the Python html5lib library.