HTML content, which may be either a single node or a sequence of sibling nodes.
This type is optimized for convenient authoring of HTML documents. It is not formally related to the HTML DOM representation. It is analogous to React's Fragment.
- element (tag : String) (attrs : Array (String × String)) (children : Html) : Html
An element with the given tag name, attributes, and children.
- text : String → Html
Textual content.
The characters
&,<, and>are always escaped to HTML entities during rendering. Userawin raw text elements (scriptandstyle) instead. - raw : String → Html
Characters to be copied verbatim (and not escaped) during rendering.
- seq : Array Html → Html
A sequence of HTML values.
Instances For
Whether this HTML is rendered as the empty string.
Instances For
If escape is true,
then characters such as & are escaped
to entities such as & during rendering.
Use false in raw text elements (script and style).
Instances For
A compact JSON encoding of Html.