Parses an HTML string.
Input HTML string.
Optional
Parsing options.
Document
const parse5 = require('parse5');const document = parse5.parse('<!DOCTYPE html><html><head></head><body>Hi there!</body></html>');console.log(document.childNodes[1].tagName); //> 'html' Copy
const parse5 = require('parse5');const document = parse5.parse('<!DOCTYPE html><html><head></head><body>Hi there!</body></html>');console.log(document.childNodes[1].tagName); //> 'html'
Parses an HTML string.