https://github.com/dart-archive/html
  
  
    Dart port of html5lib. For parsing HTML/HTML5 with Dart. Works in the client and on the server. 
    https://github.com/dart-archive/html
  
        Last synced: 16 days ago 
        JSON representation
    
Dart port of html5lib. For parsing HTML/HTML5 with Dart. Works in the client and on the server.
- Host: GitHub
 - URL: https://github.com/dart-archive/html
 - Owner: dart-archive
 - License: other
 - Archived: true
 - Created: 2014-09-22T17:56:31.000Z (about 11 years ago)
 - Default Branch: main
 - Last Pushed: 2024-10-31T13:18:01.000Z (about 1 year ago)
 - Last Synced: 2024-11-08T21:42:42.278Z (12 months ago)
 - Language: Dart
 - Homepage: https://pub.dev/packages/html
 - Size: 768 KB
 - Stars: 277
 - Watchers: 44
 - Forks: 59
 - Open Issues: 0
 - 
            Metadata Files:
            
- Readme: README.md
 - Changelog: CHANGELOG.md
 - License: LICENSE
 
 
Awesome Lists containing this project
- awesome-dart - html - Dart port of html5lib. For parsing HTML/HTML5 with Dart. Works in the client and on the server. [<img src="https://travis-ci.org/dart-lang/html.svg?branch=master">](https://travis-ci.org/dart-lang/html) (Libraries / Parsers)
 
README
          > [!IMPORTANT]  
> This repo has moved to https://github.com/dart-lang/tools/tree/main/pkgs/html
[](https://github.com/dart-lang/html/actions/workflows/test-package.yml)
[](https://pub.dev/packages/html)
[](https://pub.dev/packages/html/publisher)
A Dart implementation of an HTML5 parser.
## Usage
Parsing HTML is easy!
```dart
import 'package:html/parser.dart';
void main() {
  var document = parse(
      'Hello world! 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](https://github.com/html5lib/html5lib-python) library.