Writing HTML

Strings, numbers and lists of HTML are sub-types of html, so you can write HTML like this:

expression HTML
1 1
"Hello" Hello
"<unsafe>" &lt;unsafe&gt;
[1, 2, 3, "Hello"] 123Hello

You can build HTML using tag functions such as p and div, and they can optionally be provided attributes and child HTML.

expression HTML
div <div></div>
div "hello" <div>hello</div>
div { class = "someclass" } <div class="someclass"></div>
div { class = "someclass" } "hello" <div class="someclass">hello</div>
div [ div 1, div 2 ] <div><div>1</div><div>2</div></div>

Attributes are records with fields of type text.