Skip to main content

Module html_elements

Module html_elements 

Source
Expand description

Facts about HTML elements shared by the rules that read inline HTML.

Constants§

VOID_ELEMENTS
The void elements of the HTML standard, plus param, which browsers still parse as one. Each is complete in its start tag: it holds no content, and no later closing tag belongs to it.

Functions§

extract_attribute_with_range
Read an HTML attribute with the exact source range of its value. Slashes belong to unquoted values, including a slash immediately before >; they mark a self-closing tag only outside an attribute value.
is_html_whitespace
HTML’s ASCII whitespace excludes vertical tab, unlike Rust’s ASCII helper.
is_void_element
Whether the lowercase tag name is a void element.
start_tag_end
Find the end of a start tag without treating a quoted > as its end. source starts at the opening <; the returned offset includes >.