Attribute types.
A document-unique identifier
A reference to a document-unique identifier
A space-separated list of references to document-unique identifiers
A name with the same character constraints as ID above
A name composed of only name tokens as defined in XML 1.0
One or more white space separated NMTOKEN values
Data Types
A single character from ISO 10646.
A character encoding, as per RFC2045 (MIME).
A space-separated list of character encodings, as per RFC2045 (MIME).
type contenttype = string
A media type, as per RFC2045 (MIME).
type contenttypes = contenttype list
A comma-separated list of media types, as per RFC2045 (MIME).
type coords = string list
Comma- separated list of coordinates to use in defining areas.
Date and time information.
type number_or_datetime = [
]
Either a number or date and time information.
A character string representing an SGML Formal Public Identifier.
Frame name used as destination for results of certain actions.
type languagecode = string
A language code, as per RFC5646/BCP47.
type linktype = [
| `Alternate |
| `Archives |
| `Author |
| `Bookmark |
| `Canonical |
| `External |
| `First |
| `Help |
| `Icon |
| `Index |
| `Last |
| `License |
| `Next |
| `Nofollow |
| `Noreferrer |
| `Noopener |
| `Pingback |
| `Prefetch |
| `Prev |
| `Search |
| `Stylesheet |
| `Tag |
| `Up |
| `Other of string |
]
Authors may use the following recognized link types, listed here with their conventional interpretations. A LinkTypes value refers to a space-separated list of link types. White space characters are not permitted within link types. These link types are case-insensitive, i.e., "Alternate"
has the same meaning as "alternate"
.
User agents, search engines, etc. may interpret these link types in a variety of ways. For example, user agents may provide access to linked documents through a navigation bar.
`Alternate
: Gives alternate representations of the current document.`Archives
: Provides a link to a collection of records, documents, or other materials of historical interest.`Author
: Gives a link to the current document's author.`Bookmark
: Gives the permalink for the nearest ancestor section.`Canonical
: Gives the preferred location for accessing the current document.`External
: Indicates that the referenced document is not part of the same site as the current document.`First
: Indicates that the current document is a part of a series, and that the first document in the series is the referenced document.`Help
: Provides a link to context-sensitive help.`Icon
: Imports an icon to represent the current document.`Index
: Gives a link to the document that provides a table of contents or index listing the current document.`Last
: Indicates that the current document is a part of a series, and that the last document in the series is the referenced document.`Licence
: Indicates that the main content of the current document is covered by the copyright license described by the referenced document.`Next
: Indicates that the current document is a part of a series, and that the next document in the series is the referenced document.`Nofollow
: Indicates that the current document's original author or publisher does not endorse the referenced document.`Noreferrer
: Requires that the user agent not send an HTTP Referer (sic) header if the user follows the hyperlink.`Noopener
: Instructs the browser to open the link without granting the new browsing context access to the document that opened it.`Pingback
: Gives the address of the pingback server that handles pingbacks to the current document.`Prefetch
: Specifies that the target resource should be preemptively cached.`Prev
: Indicates that the current document is a part of a series, and that the previous document in the series is the referenced document.`Search
: Gives a link to a resource that can be used to search through the current document and its related pages.`Stylesheet
: Imports a stylesheet.`Sidebar
: Specifies that the referenced document, if retrieved, is intended to be shown in the browser's sidebar (if it has one).`Tag
: Gives a tag (identified by the given address) that applies to the current document.`Up
: Provides a link to a document giving the context for the current document.
The MediaDesc attribute is a comma-separated list of media descriptors. The following is a list of recognized media descriptors:
`Screen
: For non-paged computer screens.`TTY
: For media using a fixed-pitch character grid (like teletypes, terminals, or devices with limited display capabilities).`TV
: For TV-type devices (low resolution, limited scrollability).`Projection
: For projectors.`Handheld
: For handheld devices (small screen, limited bandwidth).`Print
: For paged and for documents viewed on screen in print preview mode.`Braille
: For braille tactile feedback devices.`Aural
: For speech synthesizers.`All
: For speech synthesizers.`Raw_mediadesc
: For more complex (untyped) media descriptors.
type float_number = float
The value is an integer that represents the number of pixels of the canvas (screen, paper). Thus, the value "50"
means fifty pixels. For normative information about the definition of a pixel, please consult CSS2.
Script data can be the content of the "script"
element and the value of intrinsic event attributes. User agents must not evaluate script data as HTML markup but instead must pass it on as data to a script engine.
The case-sensitivity of script data depends on the scripting language.
Please note that script data that is element content may not contain character references, but script data that is the value of an attribute may contain them.
Arbitrary textual data, likely meant to be human-readable.
Core
type core = [
| `Accesskey |
| `Class |
| `Contenteditable |
| `Dir |
| `Draggable |
| `Hidden |
| `Id |
| i18n |
| `Spellcheck |
| `Style_Attr |
| `Tabindex |
| `Title |
| `User_data |
| `XMLns |
]
Events
type events = [
| `OnAbort |
| `OnBlur |
| `OnCanPlay |
| `OnCanPlayThrough |
| `OnChange |
| `OnClick |
| `OnDblClick |
| `OnDrag |
| `OnDragEnd |
| `OnDragEnter |
| `OnDragLeave |
| `OnDragOver |
| `OnDragStart |
| `OnDrop |
| `OnDurationChange |
| `OnEmptied |
| `OnEnded |
| `OnError |
| `OnFocus |
| `OnFormChange |
| `OnFormInput |
| `OnInput |
| `OnInvalid |
| `OnMouseDown |
| `OnMouseUp |
| `OnMouseOver |
| `OnMouseMove |
| `OnMouseOut |
| `OnMouseWheel |
| `OnPause |
| `OnPlay |
| `OnPlaying |
| `OnProgress |
| `OnRateChange |
| `OnReadyStateChange |
| `OnScroll |
| `OnSeeked |
| `OnSeeking |
| `OnSelect |
| `OnShow |
| `OnStalled |
| `OnSubmit |
| `OnSuspend |
| `OnTimeUpdate |
| `OnTouchStart |
| `OnTouchEnd |
| `OnTouchMove |
| `OnTouchCancel |
| `OnVolumeChange |
| `OnWaiting |
| `OnKeyPress |
| `OnKeyDown |
| `OnKeyUp |
| `OnLoad |
| `OnLoadedData |
| `OnLoadedMetaData |
| `OnLoadStart |
]
ARIA
Categories of HTML elements
These category are mainly subdivised in
- interactive,
- phrasing,
- flow5, these categories may overlap
type heading = [
| `H1 |
| `H2 |
| `H3 |
| `H4 |
| `H5 |
| `H6 |
| `Hgroup |
]
type sectioning = [
| `Section |
| `Nav |
| `Aside |
| `Article |
]
type resetable = [
| `Textarea |
| `Select |
| `Output |
| `Keygen |
| `Input |
]
type submitable = [
| `Textarea |
| `Select |
| `Keygen |
| `Input |
| `Button |
]
type labelable_without_interactive = [
]
type sectionningroot = [
| `Td |
| `Figure |
| `Fieldset |
| `Details |
| `Body |
| `Blockquote |
]
type subressource_integrity = [
| `Crossorigin |
| `Integrity |
]
type (+'interactive, +'noscript, +'regular, +'media) transparent = [
| `A of 'interactive |
| `Noscript of 'noscript |
| `Canvas of 'regular |
| `Map of 'regular |
| `Ins of 'regular |
| `Del of 'regular |
| `Object of 'regular |
| `Object_interactive of 'regular |
| `Audio_interactive of 'media |
| `Video_interactive of 'media |
| `Audio of 'media |
| `Video of 'media |
]
Transparent elements. Such elements have a part of they children in their data and behaves like them. We could do something like a: 'a elt list -> 'a elt
but the information about the node name would be forgotten and would allow things like that : p [a [a []]]
. This system allow to build non-conforming terms such as a [a []]
but when passed to a standard element (such as p
), it will yield an error. Exception to that : if you embdedd the element in another transparent (of an another kind) : p [noscript (a [a []])]
will be correctly typed.
type (+'noscript, +'regular, +'media) transparent_without_interactive = [
| `Noscript of 'noscript |
| `Ins of 'regular |
| `Del of 'regular |
| `Object of 'regular |
| `Canvas of 'regular |
| `Map of 'regular |
| `Audio of 'media |
| `Video of 'media |
]
type (+'interactive, +'regular, +'media) transparent_without_noscript = [
| `A of 'interactive |
| `Ins of 'regular |
| `Del of 'regular |
| `Canvas of 'regular |
| `Map of 'regular |
| `Object of 'regular |
| `Object_interactive of 'regular |
| `Video of 'media |
| `Audio of 'media |
| `Video_interactive of 'media |
| `Audio_interactive of 'media |
]
Metadata contents. Used specially in <head>
Interactive contents : contents that require user-interaction (Forms, link, etc.)
type core_interactive = [
| `Textarea |
| `Select |
| `Label |
| `Keygen |
| `Input |
| `Img_interactive |
| `Iframe |
| `Embed |
| `Details |
| `Button |
]
Core element types are element types without transparent.
type core_phrasing = [
| labelable |
| submitable |
| `Wbr |
| `Var |
| `U |
| `Svg |
| `Time |
| `Template |
| `Sup |
| `Sub |
| `Strong |
| `Span |
| `Small |
| `Script |
| `Samp |
| `Ruby |
| `Q |
| `Mark |
| `Label |
| `Kbd |
| `Iframe |
| `I |
| `Embed |
| `Em |
| `Dfn |
| `Datalist |
| `Command |
| `Code |
| `Cite |
| `Br |
| `Bdo |
| `B |
| `Abbr |
| `Img |
| `Img_interactive |
| `PCDATA |
]
Phrasing contents is inline contents : bold text, span, and so on.
type core_phrasing_without_noscript = [
| labelable |
| submitable |
| `Wbr |
| `Var |
| `U |
| `Time |
| `Template |
| `Sup |
| `Sub |
| `Svg |
| `Strong |
| `Span |
| `Small |
| `Script |
| `Samp |
| `Ruby |
| `Q |
| `Mark |
| `Label |
| `Kbd |
| `Iframe |
| `I |
| `Embed |
| `Em |
| `Dfn |
| `Datalist |
| `Command |
| `Code |
| `Cite |
| `Br |
| `Bdo |
| `Img |
| `Img_interactive |
| `B |
| `Abbr |
| `PCDATA |
]
type core_phrasing_without_interactive = [
| labelable_without_interactive |
| `Wbr |
| `Var |
| `U |
| `Img |
| `Time |
| `Template |
| `Sup |
| `Sub |
| `Strong |
| `Span |
| `Small |
| `Script |
| `Svg |
| `Samp |
| `Ruby |
| `Q |
| `Mark |
| `Kbd |
| `Img |
| `I |
| `Em |
| `Dfn |
| `Datalist |
| `Command |
| `Code |
| `Cite |
| `Br |
| `Bdo |
| `B |
| `Abbr |
| `PCDATA |
]
and phrasing_without_interactive = [
]
type phrasing_without_dfn = [
]
Phrasing without the interactive markups
type phrasing_without_label = [
]
type phrasing_without_progress = [
]
type phrasing_without_time = [
]
type phrasing_without_meter = [
]
type core_flow5_without_interactive = [
]
type core_flow5_without_noscript = [
]
type flow5_without_interactive = [
]
and flow5_without_noscript = [
]
type flow5_without_table = [
]
type no_attribute_allowed
type html_content_fun = [
]
type head_content_fun = [
]
type body_attrib = [
| common |
| `OnAfterPrint |
| `OnBeforePrint |
| `OneBeforeUnload |
| `OnHashChange |
| `OnMessage |
| `OnOffLine |
| `OnOnLine |
| `OnPageHide |
| `OnPageShow |
| `OnPopState |
| `OnRedo |
| `OnResize |
| `OnStorage |
| `OnUndo |
| `OnUnload |
]
type body_content = flow5
type body_content_fun = flow5
type base_content = notag
type base_content_fun = notag
type title_content_fun = [
]
type section_content = [
]
type section_content_fun = [
]
type section_attrib = [
]
type nav_content_fun = [
]
type h1_content_fun = [
]
type h2_content_fun = [
]
type h3_content_fun = [
]
type h4_content_fun = [
]
type h5_content_fun = [
]
type h6_content_fun = [
]
type hgroup_content = [
| `H1 |
| `H2 |
| `H3 |
| `H4 |
| `H5 |
| `H6 |
]
type hgroup_content_fun = [
| `H1 |
| `H2 |
| `H3 |
| `H4 |
| `H5 |
| `H6 |
]
type address_content = [
]
type address_content_fun = [
]
type address_attrib = [
]
type article_content = [
]
type article_content_fun = [
]
type article_attrib = [
]
type aside_content_fun = [
]
type main_content_fun = [
]
type pre_content_fun = [
]
type blockquote_content = [
]
type blockquote_content_fun = [
]
type blockquote_attrib = [
]
type div_content_fun = [
]
type ol_content = [
| `Li of [ common | `Int_Value ] |
]
type ol_content_fun = [
| `Li of [ common | `Int_Value ] |
]
type li_content_fun = [
]
type ul_content_fun = [
]
type dd_content_fun = [
]
type dt_content_fun = [
]
type dl_content_fun = [
]
type figcaption_content = [
]
type figcaption_content_fun = [
]
type figcaption_attrib = [
]
type figure_content = [
]
type figure_content_fun = [
]
type rp_content_fun = [
]
type rt_content_fun = [
]
type ruby_content_fun = [
]
type hr_content_fun = notag
type small_content_fun = [
]
type sub_content_fun = [
]
type sup_content_fun = [
]
type mark_content_fun = [
]
type wbr_content_fun = notag
type bdo_content_fun = [
]
type abbr_content_fun = [
]
type br_content_fun = notag
type cite_content_fun = [
]
type code_content_fun = [
]
type dfn_content_fun = [
]
type em_content_fun = [
]
type kbd_content_fun = [
]
type samp_content_fun = [
]
type span_content_fun = [
]
type strong_content = [
]
type strong_content_fun = [
]
type time_content_fun = [
]
type var_content_fun = [
]
type a_attrib = [
| common |
| `Href |
| `Hreflang |
| `Media |
| `Rel |
| `Target |
| `Mime_type |
| `Download |
]
type del_content_fun = flow5
type ins_content_fun = flow5
type iframe_content = [
]
type iframe_content_fun = [
]
type iframe_attrib = [
| common |
| `Allowfullscreen |
| `Allowpaymentrequest |
| `Src |
| `Name |
| `Sandbox |
| `Seamless |
| `Width |
| `Height |
| `Referrerpolicy |
]
type object__content = [
]
type object__content_fun = flow5
type 'a object_ = [
| `Object of 'a |
| `Object_interactive of 'a |
]
type object__attrib = [
| common |
| `Data |
| `Form |
| `Mime_type |
| `Height |
| `Width |
| `Name |
| `Usemap |
]
type param_content = notag
type param_content_fun = notag
type embed_content = notag
type embed_content_fun = notag
type embed_attrib = [
| common |
| `Src |
| `Height |
| `Mime_type |
| `Width |
]
type img_interactive = [
]
type img_content_fun = notag
type img_attrib = [
| common |
| `Height |
| `Ismap |
| `Width |
| `Srcset |
| `Img_sizes |
]
type 'a audio_interactive = [
| `Audio of 'a |
| `Audio_interactive of 'a |
]
type 'a video_interactive = [
| `Video of 'a |
| `Video_interactive of 'a |
]
type canvas_content = flow5
type canvas_content_fun = flow5
type source_content = notag
type source_content_fun = notag
type source_attrib = [
| common |
| `Src |
| `Mime_type |
| `Media |
]
type area_content = notag
type area_content_fun = notag
type area_attrib = [
| common |
| `Alt |
| `Coords |
| `Shape |
| `Target |
| `Rel |
| `Media |
| `Hreflang |
| `Mime_type |
| `Download |
]
type map_content_fun = flow5
type caption_content = [
]
type caption_content_fun = [
]
type caption_attrib = [
]
type table_content_fun = [
]
type tablex_content = [
]
type tablex_content_fun = [
]
type colgroup_content = [
]
type colgroup_content_fun = [
]
type colgroup_attrib = [
]
type col_content_fun = notag
type thead_content_fun = [
]
type tbody_content_fun = [
]
type td_content_fun = [
]
type th_content_fun = [
]
type th_attrib = [
| common |
| `Colspan |
| `Rowspan |
| `Scope |
]
type tr_content_fun = [
]
type form_content_fun = [
]
type fieldset_content = [
]
type fieldset_content_fun = [
]
type fieldset_attrib = [
| common |
| `Disabled |
| `Form |
| `Name |
]
type legend_content = [
]
type legend_content_fun = [
]
type label_content_fun = [
]
type input_content = notag
type input_content_fun = notag
type textarea_attrib = [
| common |
| `Autofocus |
| `Disabled |
| `Form |
| `Maxlength |
| `Minlength |
| `Name |
| `Placeholder |
| `ReadOnly |
| `Required |
| `Wrap |
| `Rows |
| `Cols |
]
type textarea_content = [
]
type button_content = [
]
type button_content_fun = [
]
type select_content = [
]
type select_content_fun = [
]
type select_attrib = [
| common |
| `Autofocus |
| `Multiple |
| `Name |
| `Size |
| `Form |
| `Disabled |
| `Required |
]
type datalist_content = notag
type datalist_content_fun = notag
type datalist_attrib = [
]
type optgroup_content = [
]
type optgroup_content_fun = [
]
type optgroup_attrib = [
]
type option_attrib = [
| common |
| `Selected |
| `Text_Value |
| `Disabled |
| `Label |
| `Value |
]
type option_content_fun = [
]
type option_content = [
]
type keygen_content = notag
type keygen_content_fun = notag
type keygen_attrib = [
| common |
| `Autofcus |
| `Challenge |
| `Disabled |
| `Form |
| `Keytype |
| `Name |
]
type progress_content = [
]
type progress_content_fun = [
]
type progress_attrib = [
| common |
| `Float_Value |
| `Max |
| `Form |
]
type meter_content_fun = [
]
type meter_attrib = [
| common |
| `Float_Value |
| `Min |
| `Max |
| `Low |
| `High |
| `Optimum |
| `Form |
]
type output_elt_content = [
]
type output_elt_content_fun = [
]
type output_elt_attrib = [
| common |
| `Form |
| `Output_for |
| `Name |
]
type details_content = [
]
type details_content_fun = [
]
type details_attrib = [
]
type summary_content = [
]
type summary_content_fun = [
]
type summary_attrib = [
]
type command_content = notag
type command_content_fun = notag
type command_attrib = [
| common |
| `Icon |
| `Disabled |
| `Checked |
| `Radiogroup |
| `Command_Type |
]
type noscript_attrib = [
]
type meta_content = notag
type meta_content_fun = notag
type style_content_fun = [
]
type style_attrib = [
| common |
| `Media |
| `Mime_type |
| `Scoped |
]
type script_content = [
]
type script_content_fun = [
]
type template_attrib = [
]
type template_content = [
]
type template_content_fun = [
]
type link_content = notag
type link_content_fun = notag
type referrerpolicy = [
| `Empty |
| `No_referrer |
| `No_referrer_when_downgrade |
| `Origin |
| `Origin_when_cross_origin |
| `Same_origin |
| `Strict_origin |
| `Strict_origin_when_cross_origin |
| `Unsafe_url |
]
type big_variant = [
| `W3_org_1999_xhtml |
| `Default |
| `Preserve |
| `Selected |
| `Get |
| `Post |
| `Checked |
| `Disabled |
| `ReadOnly |
| `Async |
| `Autofocus |
| `Autoplay |
| `Muted |
| `Anonymous |
| `Use_credentials |
| `Controls |
| `Ltr |
| `Rtl |
| `Formnovalidate |
| `Hidden |
| `Ismap |
| `Loop |
| `Novalidate |
| `Open |
| `Audio |
| `Metadata |
| `None |
| `Pubdate |
| `Required |
| `Reversed |
| `Scoped |
| `Seamless |
| `Hard |
| `Soft |
| `Multiple |
| `Checkbox |
| `Command |
| `Radio |
| `Context |
| `Toolbar |
| `Char |
| `Justify |
| `Left |
| `Right |
| `Col |
| `Colgroup |
| `Row |
| `Rowgroup |
| `All |
| `Cols |
| `Groups |
| `None |
| `Rows |
| `Rect |
| `Circle |
| `Poly |
| `Default |
| `One |
| `Zero |
| `Auto |
| `No |
| `Yes |
| `Defer |
| `Verbatim |
| `Latin |
| `Latin_name |
| `Latin_prose |
| `Full_width_latin |
| `Kana |
| `Katakana |
| `Numeric |
| `Tel |
| `Email |
| `Url |
]
type sandbox_token = [
| `Allow_forms |
| `Allow_pointer_lock |
| `Allow_popups |
| `Allow_top_navigation |
| `Allow_same_origin |
| `Allow_script |
]