mkNormalElem : String -> Elab () Generates a normal element function using the element's name.
The function will be named `<name>` and will create a `<name>` element.
The type of the generated function is:
```idris2
(attrs : List Attribute)
-> (elems : List Element)
-> {auto 0 prf : IsRight (either_<name> attrs elems)}
-> List Element
```
The following example:
```idris2 example
%runElab mkNormalElem "a"
```
generates the below code:
```idris2
public export
a :
(attrs : List Attribute)
-> (elems : List Element)
-> {auto 0 prf : IsRight (either_a attrs elems)}
-> List Element
a attrs elems = raw_a attrs elems
```
Totality: total
Visibility: exportmkVoidElem : String -> Elab () Generates a void element function using the element's name.
The function will be named `<name>` and will create a `<name>` element.
The type of the generated function is:
```idris2
(attrs : List Attribute)
-> {auto 0 prf : IsRight (either_<name> attrs)}
-> List Element
```
The following example:
```idris2 example
%runElab mkNormalElem "br"
```
generates the below code:
```idris2
public export
a :
(attrs : List Attribute)
-> {auto 0 prf : IsRight (either_br attrs)}
-> List Element
a attrs = raw_br attrs
```
Totality: total
Visibility: exporthtml5 : (attrs : List Attribute) -> (elems : List Element) -> {auto 0 _ : IsRight (either_html attrs elems)} -> Html Creates both a doctype preamble and a **html** element.
Accepted attributes (for the **html** element):
- Global
Accepted elements (for the **html** element):
- **head**
- **body**
Additional constraints (for the **html** element):
- The first element must be the **head** element.
- The second element must be the **body** element.
- There cannot be other elements.
Totality: total
Visibility: public exporttitle : (attrs : List Attribute) -> (text : NonWhitespace) -> {auto 0 _ : IsRight (either_title attrs text)} -> List Element Creates a **title** element.
Accepted attributes:
- Global
Accepted values:
- A non-empty, not white space only string.
Totality: total
Visibility: public export