austinshenk/elm-w3/1.0.0

NOTE: the latest version is 4.0.0

W3.Html

Module that defines all usable HTML elements, their content models, and supported attributes.

Definitions

type Node nodes msg

Type for each element

type alias Attribute a msg =
Attribute a msg

Type for each attribute

type alias GlobalAttributes a msg =
Attribute
{ a
| accesskey : SupportedAttribute
, autocapitalize : SupportedAttribute
, autofocus : SupportedAttribute
, class : SupportedAttribute
, contenteditable : SupportedAttribute
, data_ : SupportedAttribute
, dir : SupportedAttribute
, draggable : SupportedAttribute
, enterkeyhint : SupportedAttribute
, hidden : SupportedAttribute
, id : SupportedAttribute
, inputmode : SupportedAttribute
, is : SupportedAttribute
, itemid : SupportedAttribute
, itemprop : SupportedAttribute
, itemref : SupportedAttribute
, itemscope : SupportedAttribute
, itemtype : SupportedAttribute
, lang : SupportedAttribute
, nonce : SupportedAttribute
, slot : SupportedAttribute
, spellcheck : SupportedAttribute
, style : SupportedAttribute
, tabindex : SupportedAttribute
, title : SupportedAttribute
, translate : SupportedAttribute
}
msg

All elements support the use of these attributes as defined by html.spec.whatwg.org/GlobalAttributes

Content Categories

Each HTML element can be categorized by zero or more of the following categories. The categories are related to each other by this chart.

Note: MetadataContent is not supported since all of its content needs to be located within a Head element or it is a script supporting element. These are not usable currently and script elements should not be supported by elm unless they are eventually just links to external resources.

type alias FlowContent =
{ address : Supported
, blockquote : Supported
, dialog : Supported
, div : Supported
, dl : Supported
, fieldset : Supported
, figure : Supported
, footer : Supported
, form : Supported
, header : Supported
, hr : Supported
, main_ : Supported
, menu : Supported
, ol : Supported
, p : Supported
, pre : Supported
, table : Supported
, ul : Supported
, abbr : Supported
, area : Supported
, b : Supported
, bdi : Supported
, bdo : Supported
, br : Supported
, cite : Supported
, code : Supported
, data : Supported
, datalist : Supported
, del : Supported
, dfn : Supported
, em : Supported
, i : Supported
, ins : Supported
, kbd : Supported
, map : Supported
, mark : Supported
, meter : Supported
, output : Supported
, progress : Supported
, q : Supported
, ruby : Supported
, s : Supported
, samp : Supported
, small : Supported
, span : Supported
, strong : Supported
, sub : Supported
, sup : Supported
, time : Supported
, u : Supported
, var : Supported
, wbr : Supported
, h1 : Supported
, h2 : Supported
, h3 : Supported
, h4 : Supported
, h5 : Supported
, h6 : Supported
, hgroup : Supported
, article : Supported
, aside : Supported
, nav : Supported
, section : Supported
, canvas : Supported
, picture : Supported
, a : Supported
, audio : Supported
, button : Supported
, details : Supported
, embed : Supported
, iframe : Supported
, img : Supported
, input : Supported
, label : Supported
, object : Supported
, select : Supported
, textarea : Supported
, video : Supported
}

Flow Content Category as defined by html.spec.whatwg.org/FlowContent

type alias HeadingContent =
{ h1 : Supported
, h2 : Supported
, h3 : Supported
, h4 : Supported
, h5 : Supported
, h6 : Supported
, hgroup : Supported
}

The Heading Content Category as defined by html.spec.whatwg.org/HeadingContent

type alias SectioningContent =
{ article : Supported
, aside : Supported
, nav : Supported
, section : Supported
}

The Sectioning Content Category as defined by html.spec.whatwg.org/SectioningContent

type alias PhrasingContent =
{ a : Supported
, abbr : Supported
, area : Supported
, audio : Supported
, b : Supported
, bdi : Supported
, bdo : Supported
, br : Supported
, button : Supported
, canvas : Supported
, cite : Supported
, code : Supported
, data : Supported
, datalist : Supported
, del : Supported
, dfn : Supported
, em : Supported
, embed : Supported
, i : Supported
, iframe : Supported
, img : Supported
, input : Supported
, ins : Supported
, kbd : Supported
, label : Supported
, map : Supported
, mark : Supported
, meter : Supported
, object : Supported
, output : Supported
, picture : Supported
, progress : Supported
, q : Supported
, ruby : Supported
, s : Supported
, samp : Supported
, select : Supported
, small : Supported
, span : Supported
, strong : Supported
, sub : Supported
, sup : Supported
, textarea : Supported
, time : Supported
, u : Supported
, var : Supported
, video : Supported
, wbr : Supported
}

The Phrasing Content Category as defined by html.spec.whatwg.org/PhrasingContent

type alias EmbeddedContent =
{ audio : Supported
, canvas : Supported
, embed : Supported
, iframe : Supported
, img : Supported
, object : Supported
, picture : Supported
, video : Supported
}

The Embedded Content Category as defined by html.spec.whatwg.org/EmbeddedContent

type alias InteractiveContent =
{ a : Supported
, audio : Supported
, button : Supported
, details : Supported
, embed : Supported
, iframe : Supported
, img : Supported
, input : Supported
, label : Supported
, object : Supported
, select : Supported
, textarea : Supported
, video : Supported
}

The Interactive Content Category as defined by html.spec.whatwg.org/InteractiveContent

Elements

The following attempts to group elements together by function and use.

Sections

https://html.spec.whatwg.org/multipage/sections.html

List (GlobalAttributes {} msg)
-> List (Node FlowContent msg)
-> Node { compatible | article : Supported } msg

Follows the element definition at html.spec.whatwg.org/article

List (GlobalAttributes {} msg)
-> List (Node FlowContent msg)
-> Node { compatible | section : Supported } msg

Follows the element definition at html.spec.whatwg.org/section

List (GlobalAttributes {} msg)
-> List (Node FlowContent msg)
-> Node { compatible | aside : Supported } msg

Follows the element definition at html.spec.whatwg.org/aside

h1 :
List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | h1 : Supported } msg

Follows the element definition at html.spec.whatwg.org/h1

h2 :
List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | h2 : Supported } msg

Follows the element definition at html.spec.whatwg.org/h2

h3 :
List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | h3 : Supported } msg

Follows the element definition at html.spec.whatwg.org/h3

h4 :
List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | h4 : Supported } msg

Follows the element definition at html.spec.whatwg.org/h4

h5 :
List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | h5 : Supported } msg

Follows the element definition at html.spec.whatwg.org/h5

h6 :
List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | h6 : Supported } msg

Follows the element definition at html.spec.whatwg.org/h6

List (GlobalAttributes {} msg)
-> List
{ h1 : Supported
, h2 : Supported
, h3 : Supported
, h4 : Supported
, h5 : Supported
, h6 : Supported
}
msg
)
-> Node { compatible | hgroup : Supported } msg

Follows the element definition at html.spec.whatwg.org/hgroup

List (GlobalAttributes {} msg)
-> List (Node FlowContent msg)
-> Node { compatible | address : Supported } msg

Follows the element definition at html.spec.whatwg.org/address

p :
List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | p : Supported } msg

Follows the element definition at html.spec.whatwg.org/p

hr :
List (GlobalAttributes {} msg)
-> Node { compatible | hr : Supported } msg

Follows the element definition at html.spec.whatwg.org/hr

pre :
List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | pre : Supported } msg

Follows the element definition at html.spec.whatwg.org/pre

List (GlobalAttributes { cite : SupportedAttribute } msg)
-> List (Node FlowContent msg)
-> Node { compatible | blockquote : Supported } msg

Follows the element definition at html.spec.whatwg.org/blockquote

ol :
List
(GlobalAttributes
{ reversed : SupportedAttribute
, start : SupportedAttribute
, type_list : SupportedAttribute
}
msg
)
-> List (Node { li : Supported } msg)
-> Node { compatible | ol : Supported } msg

Follows the element definition at html.spec.whatwg.org/ol

List
(GlobalAttributes
{ reversed : SupportedAttribute
, start : SupportedAttribute
, type_list : SupportedAttribute
}
msg
)
-> List ( String, Node { li : Supported } msg )
-> Node { compatible | ol : Supported } msg

Follows the element definition at html.spec.whatwg.org/ol

ul :
List (GlobalAttributes {} msg)
-> List (Node { li : Supported } msg)
-> Node { compatible | ul : Supported } msg

Follows the element definition at html.spec.whatwg.org/ul

List (GlobalAttributes {} msg)
-> List ( String, Node { li : Supported } msg )
-> Node { compatible | ul : Supported } msg

Follows the element definition at html.spec.whatwg.org/ul

li :
List
(GlobalAttributes { value_ordinal : SupportedAttribute } msg)
-> List (Node FlowContent msg)
-> Node { compatible | li : Supported } msg

Follows the element definition at html.spec.whatwg.org/li

dl :
List (GlobalAttributes {} msg)
-> List
{ dt : Supported
, dd : Supported
}
msg
)
-> Node { compatible | dl : Supported } msg

Follows the element definition at html.spec.whatwg.org/dl

List (GlobalAttributes {} msg)
-> List
( String
, Node
{ dt : Supported
, dd : Supported
}
msg
)
-> Node { compatible | dl : Supported } msg

Follows the element definition at html.spec.whatwg.org/dl

List (GlobalAttributes {} msg)
-> List (Node { divDl : Supported } msg)
-> Node { compatible | dl : Supported } msg

Follows the element definition at html.spec.whatwg.org/dl

List (GlobalAttributes {} msg)
-> List ( String, Node { divDl : Supported } msg )
-> Node { compatible | dl : Supported } msg

Follows the element definition at html.spec.whatwg.org/dl

dt :
List (GlobalAttributes {} msg)
-> List (Node FlowContent msg)
-> Node { compatible | dt : Supported } msg

Follows the element definition at html.spec.whatwg.org/dt Exclude heading content, sectioning content, header, footer descendant

dd :
List (GlobalAttributes {} msg)
-> List (Node FlowContent msg)
-> Node { compatible | dd : Supported } msg

Follows the element definition at html.spec.whatwg.org/dd

List (GlobalAttributes {} msg)
-> Node { figcaption : Supported } msg
-> List (Node FlowContent msg)
-> Node { compatible | figure : Supported } msg

Follows the element definition at html.spec.whatwg.org/figure

List (GlobalAttributes {} msg)
-> List (Node FlowContent msg)
-> Node { figcaption : Supported } msg
-> Node { compatible | figure : Supported } msg

Follows the element definition at html.spec.whatwg.org/figure

List (GlobalAttributes {} msg)
-> List (Node FlowContent msg)
-> Node { compatible | figure : Supported } msg

Follows the element definition at html.spec.whatwg.org/figure

List (GlobalAttributes {} msg)
-> List (Node FlowContent msg)
-> Node { compatible | figcaption : Supported } msg

Follows the element definition at html.spec.whatwg.org/figcaption

List (GlobalAttributes {} msg)
-> List (Node FlowContent msg)
-> Node { compatible | main_ : Supported } msg

Follows the element definition at html.spec.whatwg.org/main

div :
List (GlobalAttributes {} msg)
-> List (Node FlowContent msg)
-> Node { compatible | div : Supported } msg

Follows the element definition at html.spec.whatwg.org/div

List (GlobalAttributes {} msg)
-> List
{ dt : Supported
, dd : Supported
}
msg
)
-> Node { compatible | divDl : Supported } msg

Follows the element definition at html.spec.whatwg.org/div

Text

a :
List
(GlobalAttributes
{ href : SupportedAttribute
, target : SupportedAttribute
, download : SupportedAttribute
, ping : SupportedAttribute
, rel : SupportedAttribute
, hreflang : SupportedAttribute
, type_mime : SupportedAttribute
, referrerpolicy : SupportedAttribute
}
msg
)
-> List (Node FlowContent msg)
-> Node { compatible | a : Supported } msg

Follows the element definition at html.spec.whatwg.org/a

em :
List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | em : Supported } msg

Follows the element definition at html.spec.whatwg.org/em

List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | strong : Supported } msg

Follows the element definition at html.spec.whatwg.org/strong

List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | small : Supported } msg

Follows the element definition at html.spec.whatwg.org/small

s :
List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | s : Supported } msg

Follows the element definition at html.spec.whatwg.org/s

List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | cite : Supported } msg

Follows the element definition at html.spec.whatwg.org/cite

q :
List (GlobalAttributes { cite : SupportedAttribute } msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | q : Supported } msg

Follows the element definition at html.spec.whatwg.org/q

dfn :
List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | dfn : Supported } msg

Follows the element definition at html.spec.whatwg.org/dfn Exclude dfn descendant

List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | abbr : Supported } msg

Follows the element definition at html.spec.whatwg.org/abbr

List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> List
{ rt : Supported
, rp : Supported
}
msg
)
-> Node { compatible | ruby : Supported } msg

Follows the element definition at html.spec.whatwg.org/ruby Content model: Exclude ruby descendant

List (GlobalAttributes {} msg)
-> Node { rubyDescendent : Supported } msg
-> List
{ rt : Supported
, rp : Supported
}
msg
)
-> Node { compatible | ruby : Supported } msg

Follows the element definition at html.spec.whatwg.org/ruby

List (GlobalAttributes {} msg)
-> List
{ rt : Supported
, rp : Supported
}
msg
)
-> Node { compatible | rubyDescendent : Supported } msg

Follows the element definition at html.spec.whatwg.org/ruby

rt :
List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | rt : Supported } msg

Follows the element definition at html.spec.whatwg.org/rt

rp :
List (GlobalAttributes {} msg)
-> String
-> Node { compatible | rp : Supported } msg

Follows the element definition at html.spec.whatwg.org/rp

List (GlobalAttributes { value : SupportedAttribute } msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | data : Supported } msg

Follows the element definition at html.spec.whatwg.org/data

List (GlobalAttributes { datetime : SupportedAttribute } msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | time : Supported } msg

Follows the element definition at html.spec.whatwg.org/time

List (GlobalAttributes { datetime : SupportedAttribute } msg)
-> String
-> Node { compatible | time : Supported } msg

Follows the element definition at html.spec.whatwg.org/time

List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | code : Supported } msg

Follows the element definition at html.spec.whatwg.org/code

var :
List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | var : Supported } msg

Follows the element definition at html.spec.whatwg.org/var

List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | samp : Supported } msg

Follows the element definition at html.spec.whatwg.org/samp

kbd :
List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | kbd : Supported } msg

Follows the element definition at html.spec.whatwg.org/kbd

sub :
List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | sub : Supported } msg

Follows the element definition at html.spec.whatwg.org/sub

sup :
List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | sup : Supported } msg

Follows the element definition at html.spec.whatwg.org/sup

i :
List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | i : Supported } msg

Follows the element definition at html.spec.whatwg.org/i

b :
List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | b : Supported } msg

Follows the element definition at html.spec.whatwg.org/b

u :
List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | u : Supported } msg

Follows the element definition at html.spec.whatwg.org/u

List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | mark : Supported } msg

Follows the element definition at html.spec.whatwg.org/mark

bdi :
List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | bdi : Supported } msg

Follows the element definition at html.spec.whatwg.org/bdi

bdo :
List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | bdo : Supported } msg

Follows the element definition at html.spec.whatwg.org/bdo

List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | span : Supported } msg

Follows the element definition at html.spec.whatwg.org/span

br :
List (GlobalAttributes {} msg)
-> Node { compatible | br : Supported } msg

Follows the element definition at html.spec.whatwg.org/br

wbr :
List (GlobalAttributes {} msg)
-> Node { compatible | wbr : Supported } msg

Follows the element definition at html.spec.whatwg.org/wbr

Edits

ins :
List
(GlobalAttributes
{ cite : SupportedAttribute
, datetime : SupportedAttribute
}
msg
)
-> List (Node FlowContent msg)
-> Node { compatible | ins : Supported } msg

Follows the element definition at html.spec.whatwg.org/ins

del :
List
(GlobalAttributes
{ cite : SupportedAttribute
, datetime : SupportedAttribute
}
msg
)
-> List (Node FlowContent msg)
-> Node { compatible | del : Supported } msg

Follows the element definition at html.spec.whatwg.org/del

Embedded

List (GlobalAttributes {} msg)
-> List (Node { source : Supported } msg)
-> Node { img : Supported } msg
-> Node { compatible | picture : Supported } msg

Follows the element definition at html.spec.whatwg.org/picture

List
(GlobalAttributes
{ src : SupportedAttribute
, type_mime : SupportedAttribute
, srcset : SupportedAttribute
, sizes : SupportedAttribute
, media : SupportedAttribute
}
msg
)
-> Node { compatible | source : Supported } msg

Follows the element definition at html.spec.whatwg.org/source

img :
List
(GlobalAttributes
{ alt : SupportedAttribute
, src : SupportedAttribute
, srcset : SupportedAttribute
, sizes : SupportedAttribute
, crossorigin : SupportedAttribute
, usemap : SupportedAttribute
, ismap : SupportedAttribute
, width : SupportedAttribute
, height : SupportedAttribute
, referrerpolicy : SupportedAttribute
, decoding : SupportedAttribute
}
msg
)
-> Node { compatible | img : Supported } msg

Follows the element definition at html.spec.whatwg.org/img

Iframe

List
(GlobalAttributes
{ src : SupportedAttribute
, srcdoc : SupportedAttribute
, name : SupportedAttribute
, sandbox : SupportedAttribute
, allow : SupportedAttribute
, allowfullscreen : SupportedAttribute
, allowpaymentrequest : SupportedAttribute
, width : SupportedAttribute
, height : SupportedAttribute
, referrerpolicy : SupportedAttribute
}
msg
)
-> Node { compatible | iframe : Supported } msg

Follows the element definition at html.spec.whatwg.org/iframe

List
(GlobalAttributes
{ src : SupportedAttribute
, type_mime : SupportedAttribute
, width : SupportedAttribute
, height : SupportedAttribute
}
msg
)
-> Node { compatible | embed : Supported } msg

Follows the element definition at html.spec.whatwg.org/embed

List
(GlobalAttributes
{ data : SupportedAttribute
, type_mime : SupportedAttribute
, name : SupportedAttribute
, usemap : SupportedAttribute
, form : SupportedAttribute
, width : SupportedAttribute
, height : SupportedAttribute
}
msg
)
-> List (Node { param : Supported } msg)
-> List (Node FlowContent msg)
-> Node { compatible | object : Supported } msg

Follows the element definition at html.spec.whatwg.org/object

List (GlobalAttributes {} msg)
-> ( String, String )
-> Node { compatible | param : Supported } msg

Follows the element definition at html.spec.whatwg.org/param

Media

List
(GlobalAttributes
{ src : SupportedAttribute
, crossorigin : SupportedAttribute
, poster : SupportedAttribute
, preload : SupportedAttribute
, autoplay : SupportedAttribute
, playsinline : SupportedAttribute
, loop : SupportedAttribute
, muted : SupportedAttribute
, controls : SupportedAttribute
, width : SupportedAttribute
, height : SupportedAttribute
}
msg
)
-> List (Node { source : Supported } msg)
-> List (Node { track : Supported } msg)
-> List (Node FlowContent msg)
-> Node { compatible | video : Supported } msg

Follows the element definition at html.spec.whatwg.org/video

List
(GlobalAttributes
{ src : SupportedAttribute
, crossorigin : SupportedAttribute
, preload : SupportedAttribute
, autoplay : SupportedAttribute
, loop : SupportedAttribute
, muted : SupportedAttribute
, controls : SupportedAttribute
}
msg
)
-> List (Node { source : Supported } msg)
-> List (Node { track : Supported } msg)
-> List (Node FlowContent msg)
-> Node { compatible | audio : Supported } msg

Follows the element definition at html.spec.whatwg.org/audio

List
(GlobalAttributes
{ kind : SupportedAttribute
, src : SupportedAttribute
, srclang : SupportedAttribute
, label : SupportedAttribute
, default : SupportedAttribute
}
msg
)
-> Node { compatible | track : Supported } msg

Follows the element definition at html.spec.whatwg.org/track

Map

map :
List (GlobalAttributes { name : SupportedAttribute } msg)
-> List (Node FlowContent msg)
-> Node { compatible | map : Supported } msg

Follows the element definition at html.spec.whatwg.org/map

List
(GlobalAttributes
{ alt : SupportedAttribute
, coords : SupportedAttribute
, shape : SupportedAttribute
, href : SupportedAttribute
, target : SupportedAttribute
, download : SupportedAttribute
, ping : SupportedAttribute
, rel : SupportedAttribute
, referrerpolicy : SupportedAttribute
}
msg
)
-> Node { compatible | area : Supported } msg

Follows the element definition at html.spec.whatwg.org/area

Table

type Table msg

The Type that is passed around the table pipeline

type alias TableContents msg =
{ caption : Maybe (Node msg)
, colgroups : List (Node msg)
, thead : Maybe (Node msg)
, tfoot : Maybe (Node msg)
}

Defines the allowed descendants of a table excluding the tbody

table : List (GlobalAttributes {} msg) -> Table msg

Follows the element definition at html.spec.whatwg.org/table

List (GlobalAttributes {} msg)
-> List (Node FlowContent msg)
-> Table msg
-> Table msg

Follows the element definition at html.spec.whatwg.org/caption

List (GlobalAttributes { span : SupportedAttribute } msg)
-> List (Node { col : Supported } msg)
-> Table msg
-> Table msg

Follows the element definition at html.spec.whatwg.org/colgroup

col :
List (GlobalAttributes { span : SupportedAttribute } msg)
-> Node { compatible | col : Supported } msg

Follows the element definition at html.spec.whatwg.org/col

List (GlobalAttributes {} msg)
-> List (Node { tr : Supported } msg)
-> Table msg
-> Table msg

Follows the element definition at html.spec.whatwg.org/thead

List (GlobalAttributes {} msg)
-> List (Node { tr : Supported } msg)
-> Table msg
-> Table msg

Follows the element definition at html.spec.whatwg.org/tfoot

List (GlobalAttributes {} msg)
-> List (Node { tr : Supported } msg)
-> Table msg
-> Node { compatible | table : Supported } msg

Follows the element definition at html.spec.whatwg.org/tbody

List (Node { tr : Supported } msg)
-> Table msg
-> Node { compatible | table : Supported } msg

Follows the element definition at html.spec.whatwg.org/tr

tr :
List (GlobalAttributes {} msg)
-> List
{ td : Supported
, th : Supported
}
msg
)
-> Node { compatible | tr : Supported } msg

Follows the element definition at html.spec.whatwg.org/tr

td :
List
(GlobalAttributes
{ colspan : SupportedAttribute
, rowspan : SupportedAttribute
, headers : SupportedAttribute
}
msg
)
-> List (Node FlowContent msg)
-> Node { compatible | td : Supported } msg

Follows the element definition at html.spec.whatwg.org/td

th :
List
(GlobalAttributes
{ colspan : SupportedAttribute
, rowspan : SupportedAttribute
, headers : SupportedAttribute
, scope : SupportedAttribute
, abbr : SupportedAttribute
}
msg
)
-> List (Node FlowContent msg)
-> Node { compatible | th : Supported } msg

Follows the element definition at html.spec.whatwg.org/th Content model: Excludes header, footer, sectioning content, heading content

Forms

List
(GlobalAttributes
{ acceptcharset : SupportedAttribute
, action : SupportedAttribute
, autocomplete : SupportedAttribute
, enctype : SupportedAttribute
, method : SupportedAttribute
, name : SupportedAttribute
, novalidate : SupportedAttribute
, target : SupportedAttribute
, rel : SupportedAttribute
}
msg
)
-> List (Node FlowContent msg)
-> Node { compatible | form : Supported } msg

Follows the element definition at html.spec.whatwg.org/form Content model: Excludes form

List (GlobalAttributes { for : SupportedAttribute } msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | label : Supported } msg

Follows the element definition at html.spec.whatwg.org/label

Inputs

List
(GlobalAttributes
{ accept : SupportedAttribute
, alt : SupportedAttribute
, autocomplete : SupportedAttribute
, checked : SupportedAttribute
, dirname : SupportedAttribute
, disabled : SupportedAttribute
, form : SupportedAttribute
, formaction : SupportedAttribute
, formenctype : SupportedAttribute
, formmethod : SupportedAttribute
, formnovalidate : SupportedAttribute
, formtarget : SupportedAttribute
, height : SupportedAttribute
, list : SupportedAttribute
, max : SupportedAttribute
, maxlength : SupportedAttribute
, min : SupportedAttribute
, minlength : SupportedAttribute
, multiple : SupportedAttribute
, name : SupportedAttribute
, pattern : SupportedAttribute
, placeholder : SupportedAttribute
, readonly : SupportedAttribute
, required : SupportedAttribute
, size : SupportedAttribute
, src : SupportedAttribute
, step : SupportedAttribute
, type_input : SupportedAttribute
, value : SupportedAttribute
, width : SupportedAttribute
}
msg
)
-> Node { compatible | input : Supported } msg

Follows the element definition at html.spec.whatwg.org/input

List
(GlobalAttributes { autocomplete : SupportedAttribute } msg)
-> Node { compatible | input : Supported } msg

Follows the element definition at [html.spec.whatwg.org/hidden](https://html.spec.whatwg.org/multipage/input.html#hidden-state-(type=hidden))

List
(GlobalAttributes
{ autocomplete : SupportedAttribute
, dirname : SupportedAttribute
, list : SupportedAttribute
, maxlength : SupportedAttribute
, minlength : SupportedAttribute
, pattern : SupportedAttribute
, placeholder : SupportedAttribute
, readonly : SupportedAttribute
, required : SupportedAttribute
, size : SupportedAttribute
}
msg
)
-> Node { compatible | input : Supported } msg

Follows the element definition at [html.spec.whatwg.org/text](https://html.spec.whatwg.org/multipage/input.html#text-(type=text)-state-and-search-state-(type=search))

url :
List
(GlobalAttributes
{ autocomplete : SupportedAttribute
, list : SupportedAttribute
, maxlength : SupportedAttribute
, minlength : SupportedAttribute
, pattern : SupportedAttribute
, placeholder : SupportedAttribute
, readonly : SupportedAttribute
, required : SupportedAttribute
, size : SupportedAttribute
}
msg
)
-> Node { compatible | input : Supported } msg

Follows the element definition at [html.spec.whatwg.org/url](https://html.spec.whatwg.org/multipage/input.html#url-state-(type=url))

tel :
List
(GlobalAttributes
{ autocomplete : SupportedAttribute
, list : SupportedAttribute
, maxlength : SupportedAttribute
, minlength : SupportedAttribute
, pattern : SupportedAttribute
, placeholder : SupportedAttribute
, readonly : SupportedAttribute
, required : SupportedAttribute
, size : SupportedAttribute
}
msg
)
-> Node { compatible | input : Supported } msg

Follows the element definition at [html.spec.whatwg.org/tel](https://html.spec.whatwg.org/multipage/input.html#telephone-state-(type=tel))

List
(GlobalAttributes
{ autocomplete : SupportedAttribute
, list : SupportedAttribute
, maxlength : SupportedAttribute
, minlength : SupportedAttribute
, multiple : SupportedAttribute
, pattern : SupportedAttribute
, placeholder : SupportedAttribute
, readonly : SupportedAttribute
, required : SupportedAttribute
, size : SupportedAttribute
}
msg
)
-> Node { compatible | input : Supported } msg

Follows the element definition at [html.spec.whatwg.org/email](https://html.spec.whatwg.org/multipage/input.html#e-mail-state-(type=email))

List
(GlobalAttributes
{ autocomplete : SupportedAttribute
, maxlength : SupportedAttribute
, minlength : SupportedAttribute
, pattern : SupportedAttribute
, placeholder : SupportedAttribute
, readonly : SupportedAttribute
, required : SupportedAttribute
, size : SupportedAttribute
}
msg
)
-> Node { compatible | input : Supported } msg

Follows the element definition at [html.spec.whatwg.org/password](https://html.spec.whatwg.org/multipage/input.html#password-state-(type=password))

List
(GlobalAttributes
{ autocomplete : SupportedAttribute
, list : SupportedAttribute
, max : SupportedAttribute
, min : SupportedAttribute
, readonly : SupportedAttribute
, required : SupportedAttribute
, step : SupportedAttribute
}
msg
)
-> Node { compatible | input : Supported } msg

Follows the element definition at [html.spec.whatwg.org/date](https://html.spec.whatwg.org/multipage/input.html#date-state-(type=date))

List
(GlobalAttributes
{ autocomplete : SupportedAttribute
, list : SupportedAttribute
, max : SupportedAttribute
, min : SupportedAttribute
, readonly : SupportedAttribute
, required : SupportedAttribute
, step : SupportedAttribute
}
msg
)
-> Node { compatible | input : Supported } msg

Follows the element definition at [html.spec.whatwg.org/month](https://html.spec.whatwg.org/multipage/input.html#month-state-(type=month))

List
(GlobalAttributes
{ autocomplete : SupportedAttribute
, list : SupportedAttribute
, max : SupportedAttribute
, min : SupportedAttribute
, readonly : SupportedAttribute
, required : SupportedAttribute
, step : SupportedAttribute
}
msg
)
-> Node { compatible | input : Supported } msg

Follows the element definition at [html.spec.whatwg.org/week](https://html.spec.whatwg.org/multipage/input.html#week-state-(type=week))

List
(GlobalAttributes
{ autocomplete : SupportedAttribute
, list : SupportedAttribute
, max : SupportedAttribute
, min : SupportedAttribute
, readonly : SupportedAttribute
, required : SupportedAttribute
, step : SupportedAttribute
}
msg
)
-> Node { compatible | input : Supported } msg

Follows the element definition at [html.spec.whatwg.org/time](https://html.spec.whatwg.org/multipage/input.html#time-state-(type=time))

List
(GlobalAttributes
{ autocomplete : SupportedAttribute
, list : SupportedAttribute
, max : SupportedAttribute
, min : SupportedAttribute
, readonly : SupportedAttribute
, required : SupportedAttribute
, step : SupportedAttribute
}
msg
)
-> Node { compatible | input : Supported } msg

Follows the element definition at [html.spec.whatwg.org/datetime](https://html.spec.whatwg.org/multipage/input.html#local-date-and-time-state-(type=datetime-local))

List
(GlobalAttributes
{ autocomplete : SupportedAttribute
, list : SupportedAttribute
, max : SupportedAttribute
, min : SupportedAttribute
, placeholder : SupportedAttribute
, readonly : SupportedAttribute
, required : SupportedAttribute
, step : SupportedAttribute
}
msg
)
-> Node { compatible | input : Supported } msg

Follows the element definition at [html.spec.whatwg.org/number](https://html.spec.whatwg.org/multipage/input.html#number-state-(type=number))

List
(GlobalAttributes
{ autocomplete : SupportedAttribute
, list : SupportedAttribute
, max : SupportedAttribute
, min : SupportedAttribute
, step : SupportedAttribute
}
msg
)
-> Node { compatible | input : Supported } msg

Follows the element definition at [html.spec.whatwg.org/range](https://html.spec.whatwg.org/multipage/input.html#range-state-(type=range))

List
(GlobalAttributes
{ autocomplete : SupportedAttribute
, list : SupportedAttribute
}
msg
)
-> Node { compatible | input : Supported } msg

Follows the element definition at [html.spec.whatwg.org/color](https://html.spec.whatwg.org/multipage/input.html#color-state-(type=color))

List
(GlobalAttributes
{ checked : SupportedAttribute
, required : SupportedAttribute
}
msg
)
-> Node { compatible | input : Supported } msg

Follows the element definition at [html.spec.whatwg.org/checkbox](https://html.spec.whatwg.org/multipage/input.html#checkbox-state-(type=checkbox))

List
(GlobalAttributes
{ checked : SupportedAttribute
, required : SupportedAttribute
}
msg
)
-> Node { compatible | input : Supported } msg

Follows the element definition at [html.spec.whatwg.org/radio](https://html.spec.whatwg.org/multipage/input.html#radio-button-state-(type=radio))

List
(GlobalAttributes
{ accept : SupportedAttribute
, multiple : SupportedAttribute
, required : SupportedAttribute
}
msg
)
-> Node { compatible | input : Supported } msg

Follows the element definition at [html.spec.whatwg.org/file](https://html.spec.whatwg.org/multipage/input.html#file-upload-state-(type=file))

List
(GlobalAttributes
{ formaction : SupportedAttribute
, formenctype : SupportedAttribute
, formmethod : SupportedAttribute
, formnovalidate : SupportedAttribute
, formtarget : SupportedAttribute
}
msg
)
-> Node { compatible | input : Supported } msg

Follows the element definition at [html.spec.whatwg.org/submit](https://html.spec.whatwg.org/multipage/input.html#submit-button-state-(type=submit))

List
(GlobalAttributes
{ alt : SupportedAttribute
, formaction : SupportedAttribute
, formenctype : SupportedAttribute
, formmethod : SupportedAttribute
, formnovalidate : SupportedAttribute
, formtarget : SupportedAttribute
, height : SupportedAttribute
, src : SupportedAttribute
, width : SupportedAttribute
}
msg
)
-> Node { compatible | input : Supported } msg

Follows the element definition at [html.spec.whatwg.org/image](https://html.spec.whatwg.org/multipage/input.html#image-button-state-(type=image))

List (GlobalAttributes {} msg)
-> Node { compatible | input : Supported } msg

Follows the element definition at [html.spec.whatwg.org/reset](https://html.spec.whatwg.org/multipage/input.html#reset-button-state-(type=reset))

List (GlobalAttributes {} msg)
-> Node { compatible | input : Supported } msg

Follows the element definition at [html.spec.whatwg.org/button](https://html.spec.whatwg.org/multipage/input.html#button-state-(type=button))

Form Elements

List
(GlobalAttributes
{ disabled : SupportedAttribute
, form : SupportedAttribute
, formaction : SupportedAttribute
, formenctype : SupportedAttribute
, formmethod : SupportedAttribute
, formnovalidate : SupportedAttribute
, formtarget : SupportedAttribute
, name : SupportedAttribute
, type_button : SupportedAttribute
, value : SupportedAttribute
}
msg
)
-> List (Node PhrasingContent msg)
-> Node { compatible | button : Supported } msg

Follows the element definition at html.spec.whatwg.org/button

List
(GlobalAttributes
{ autocomplete : SupportedAttribute
, disabled : SupportedAttribute
, form : SupportedAttribute
, multiple : SupportedAttribute
, name : SupportedAttribute
, required : SupportedAttribute
, size : SupportedAttribute
}
msg
)
-> List
{ option : Supported
, optgroup : Supported
}
msg
)
-> Node { compatible | select : Supported } msg

Follows the element definition at html.spec.whatwg.org/select

List
(GlobalAttributes
{ disabled : SupportedAttribute
, label : SupportedAttribute
}
msg
)
-> List (Node { option : Supported } msg)
-> Node { compatible | optgroup : Supported } msg

Follows the element definition at html.spec.whatwg.org/optgroup

List (GlobalAttributes {} msg)
-> List (Node { option : Supported } msg)
-> Node { compatible | datalist : Supported } msg

Follows the element definition at html.spec.whatwg.org/datalist

List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | datalist : Supported } msg

Follows the element definition at html.spec.whatwg.org/datalist

List
(GlobalAttributes
{ disabled : SupportedAttribute
, selected : SupportedAttribute
, value : SupportedAttribute
}
msg
)
-> String
-> Node { compatible | option : Supported } msg

Follows the element definition at html.spec.whatwg.org/option

List
(GlobalAttributes
{ disabled : SupportedAttribute
, selected : SupportedAttribute
, value : SupportedAttribute
}
msg
)
-> String
-> Node { compatible | option : Supported } msg

Follows the element definition at html.spec.whatwg.org/option

List
(GlobalAttributes
{ autocomplete : SupportedAttribute
, cols : SupportedAttribute
, dirname : SupportedAttribute
, disabled : SupportedAttribute
, form : SupportedAttribute
, maxlength : SupportedAttribute
, minlength : SupportedAttribute
, name : SupportedAttribute
, placeholder : SupportedAttribute
, readonly : SupportedAttribute
, required : SupportedAttribute
, rows : SupportedAttribute
, wrap : SupportedAttribute
}
msg
)
-> String
-> Node { compatible | textarea : Supported } msg

Follows the element definition at html.spec.whatwg.org/textarea

List
(GlobalAttributes
{ for : SupportedAttribute
, form : SupportedAttribute
, name : SupportedAttribute
}
msg
)
-> List (Node PhrasingContent msg)
-> Node { compatible | output : Supported } msg

Follows the element definition at html.spec.whatwg.org/output

List
(GlobalAttributes
{ value_ordinal : SupportedAttribute
, max : SupportedAttribute
}
msg
)
-> List (Node PhrasingContent msg)
-> Node { compatible | progress : Supported } msg

Follows the element definition at html.spec.whatwg.org/progress

List
(GlobalAttributes
{ value_ordinal : SupportedAttribute
, min : SupportedAttribute
, max : SupportedAttribute
, low : SupportedAttribute
, high : SupportedAttribute
, optimum : SupportedAttribute
}
msg
)
-> List (Node PhrasingContent msg)
-> Node { compatible | meter : Supported } msg

Follows the element definition at html.spec.whatwg.org/meter

List
(GlobalAttributes
{ disabled : SupportedAttribute
, form : SupportedAttribute
, name : SupportedAttribute
}
msg
)
-> ( List (GlobalAttributes {} msg)
, List (Node PhrasingContent msg)
)
-> List (Node FlowContent msg)
-> Node { compatible | fieldset : Supported } msg

Follows the element definition at html.spec.whatwg.org/fieldset

Interactive Elements

List (GlobalAttributes { open : SupportedAttribute } msg)
-> Node { summary : Supported } msg
-> List (Node FlowContent msg)
-> Node { compatible | details : Supported } msg

Follows the element definition at html.spec.whatwg.org/details

List (GlobalAttributes {} msg)
-> List (Node PhrasingContent msg)
-> Node { compatible | summary : Supported } msg

Follows the element definition at html.spec.whatwg.org/summary

List (GlobalAttributes {} msg)
-> Node HeadingContent msg
-> Node { compatible | summary : Supported } msg

Follows the element definition at html.spec.whatwg.org/summary

List (GlobalAttributes { open : SupportedAttribute } msg)
-> List (Node FlowContent msg)
-> Node { compatible | dialog : Supported } msg

Follows the element definition at html.spec.whatwg.org/dialog

Canvas

List
(GlobalAttributes
{ width : SupportedAttribute
, height : SupportedAttribute
}
msg
)
-> Node { compatible | canvas : Supported } msg

Follows the element definition at html.spec.whatwg.org/canvas

Text

text : String -> Node a msg

Textual content

Utility

toNode : Node a msg -> Node msg

Function that allows converting the internal Node structure to VirtualDom.Node. This only needs to be done on the root element since ancestors are automatically converted as they are processed.

W3.Html.div [] [ W3.Html.a [] [] ] |> W3.Html.toHtml
toAttributes : List (Attribute a msg) -> List (Attribute msg)

Helper method that makes it easier to convert lists of Attributes.

toAttribute : Attribute a msg -> Attribute msg

Allows converting the internal Attribute type to a a VirtualDom.Attribute. This should be used sparingly since this package can not guarantee valid HTML after it is converted.

Escape Hatch

node : String -> List (Attribute a msg) -> List (Node b msg) -> Node c msg

Use this function as an escape hatch to support elements that may not be supported by this package.

Keyed nodes

String
-> List (Attribute a msg)
-> List ( String, Node b msg )
-> Node c msg

Lazy rendering

Various functions to make node rendering lazy.

lazy : (a -> Node b msg) -> a -> Node b msg
lazy2 : (a -> b -> Node c msg) -> a -> b -> Node c msg
lazy3 : (a -> b -> c -> Node d msg) -> a -> b -> c -> Node d msg
lazy4 : (a -> b -> c -> d -> Node e msg) -> a -> b -> c -> d -> Node e msg
lazy5 : (a -> b -> c -> d -> e -> Node f msg) -> a -> b -> c -> d -> e -> Node f msg
lazy6 : (a -> b -> c -> d -> e -> f -> Node g msg) -> a -> b -> c -> d -> e -> f -> Node g msg
(a -> b -> c -> d -> e -> f -> g -> Node h msg)
-> a
-> b
-> c
-> d
-> e
-> f
-> g
-> Node h msg
(a -> b -> c -> d -> e -> f -> g -> h -> Node i msg)
-> a
-> b
-> c
-> d
-> e
-> f
-> g
-> h
-> Node i msg

Events

on :
String
-> Event msg
-> (Event msg -> Decoder (Event msg))
-> Attribute b msg
onabort : msg -> Attribute a msg
onauxclick : msg -> Attribute a msg
onblur : msg -> Attribute a msg
oncancel : msg -> Attribute a msg
oncanplay : msg -> Attribute a msg
oncanplaythrough : msg -> Attribute a msg
onchange : msg -> Attribute a msg
onclick : msg -> Attribute a msg
onclose : msg -> Attribute a msg
oncontextmenu : msg -> Attribute a msg
oncopy : msg -> Attribute a msg
oncuechange : msg -> Attribute a msg
oncut : msg -> Attribute a msg
ondblclick : msg -> Attribute a msg
ondrag : msg -> Attribute a msg
ondragend : msg -> Attribute a msg
ondragenter : msg -> Attribute a msg
ondragexit : msg -> Attribute a msg
ondragleave : msg -> Attribute a msg
ondragover : msg -> Attribute a msg
ondragstart : msg -> Attribute a msg
ondrop : msg -> Attribute a msg
ondurationchange : msg -> Attribute a msg
onemptied : msg -> Attribute a msg
onended : msg -> Attribute a msg
onerror : msg -> Attribute a msg
onfocus : msg -> Attribute a msg
onformdata : msg -> Attribute a msg
oninput : msg -> Attribute a msg
oninvalid : msg -> Attribute a msg
onkeydown : msg -> Attribute a msg
onkeypress : msg -> Attribute a msg
onkeyup : msg -> Attribute a msg
onload : msg -> Attribute a msg
onloadeddata : msg -> Attribute a msg
onloadedmetadata : msg -> Attribute a msg
onloadedstart : msg -> Attribute a msg
onmousedown : msg -> Attribute a msg
onmouseenter : msg -> Attribute a msg
onmouseleave : msg -> Attribute a msg
onmousemove : msg -> Attribute a msg
onmouseout : msg -> Attribute a msg
onmouseover : msg -> Attribute a msg
onmouseup : msg -> Attribute a msg
onpaste : msg -> Attribute a msg
onpause : msg -> Attribute a msg
onplay : msg -> Attribute a msg
onplaying : msg -> Attribute a msg
onprogress : msg -> Attribute a msg
onratechange : msg -> Attribute a msg
onreset : msg -> Attribute a msg
onresize : msg -> Attribute a msg
onscroll : msg -> Attribute a msg
onsecuritypolicyviolation : msg -> Attribute a msg
onseeked : msg -> Attribute a msg
onseeking : msg -> Attribute a msg
onselect : msg -> Attribute a msg
onslotchange : msg -> Attribute a msg
onstalled : msg -> Attribute a msg
onsubmit : msg -> Attribute a msg
onsuspend : msg -> Attribute a msg
ontimeupdate : msg -> Attribute a msg
ontoggle : msg -> Attribute a msg
onvolumechange : msg -> Attribute a msg
onwaiting : msg -> Attribute a msg
onwheel : msg -> Attribute a msg