zhtml

Zig / WebAssembly

Source

Borrowed UTF-8. Input stays intact.
Whitespace-only text nodes are dropped.

Indexed tree

Parent links. Contiguous subtrees.

Input changed. Parse to rebuild the tree.

Query

โ€”
CSS compiled at runtime in Zig.
5 / 256 bytes
ZigHTML parserCSS selectors

Parse HTML into a tree and query it with CSS selectors. zhtml prioritises throughput; its handling of malformed HTML differs from a browser.