Html_types
HTML types with variants, goes with Html_sigs.T
.
type idrefs = idref list
A space-separated list of references to document-unique identifiers
type nmtokens = nmtoken list
One or more white space separated NMTOKEN values
type charsets = charset list
A space-separated list of character encodings, as per RFC2045 (MIME).
type contenttypes = contenttype list
A comma-separated list of media types, as per RFC2045 (MIME).
type numbers = number list
Either a number or date and time information.
type linktype = [
| `Alternate
| `Archives
| `Author
| `Bookmark
| `Canonical
| `Dns_prefetch
| `External
| `First
| `Help
| `Icon
| `Index
| `Last
| `License
| `Manifest
| `Me
| `Modulepreload
| `Next
| `Nofollow
| `Noopener
| `Noreferrer
| `Opener
| `Pingback
| `Preconnect
| `Prefetch
| `Prev
| `Preload
| `Prerender
| `Search
| `Stylesheet
| `Sidebar
| `Tag
| `Up
| `Other of string
]
type linktypes = linktype list
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.`Dns_prefetch
: Specifies that the user agent should preemptively perform DNS resolution for the target resource's origin..`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.`Manifest
: Imports or links to an application manifest.`Me
: Indicates that the current document represents the person who owns the linked content.`Modulepreload
: Specifies that the user agent must preemptively fetch the module script and store it in the document's module map for later evaluation. Optionally, the module's dependencies can be fetched as well.`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.`Noopener
: Instructs the browser to open the link without granting the new browsing context access to the document that opened it.`Noreferrer
: Requires that the user agent not send an HTTP Referer (sic) header if the user follows the hyperlink.`Opener
: Creates an auxiliary browsing context if the hyperlink would otherwise create a top-level traversable with a non-auxiliary browsing context (i.e., has "_blank" as target attribute value).`Pingback
: Gives the address of the pingback server that handles pingbacks to the current document.`Preconnect
: Specifies that the user agent should preemptively connect to the target resource's origin.`Prefetch
: Specifies that the target resource should be preemptively cached.`Preload
: Specifies that the user agent must preemptively fetch and cache the target resource for current navigation according to the potential destination given by the as attribute (and the priority associated with the corresponding destination).`Prerender
: Specifies that the user agent should preemptively fetch the target resource and process it in a way that helps deliver a faster response in the future.`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.type mediadesc = mediadesc_token list
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.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.
type core = [
| `Accesskey
| `Class
| `Contenteditable
| `Dir
| `Draggable
| `Hidden
| `Id
| i18n
| `Spellcheck
| `Style_Attr
| `Tabindex
| `Translate
| `Title
| `User_data
| `XMLns
]
type events = [
| `OnAbort
| `OnBlur
| `OnCanPlay
| `OnCanPlayThrough
| `OnChange
| `OnClick
| `OnClose
| `OnContextMenu
| `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
]
Javascript events
These category are mainly subdivised in
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 (+'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
]
type metadata_without_title = [
| `Template
| `Style
| `Script
| `Noscript of [ `Meta | `Link | `Style ]
| `Meta
| `Link
| `Command
| `Base
]
Metadata without title
Metadata contents. Used specially in <head>
Interactive contents : contents that require user-interaction (Forms, link, etc.)
type core_interactive = [
| `Textarea
| `Select
| `Menu
| `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
| `Picture
| `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
| `Picture
| `B
| `Abbr
| `PCDATA
]
type core_phrasing_without_interactive = [
| labelable_without_interactive
| `Wbr
| `Var
| `U
| `Time
| `Template
| `Sup
| `Sub
| `Strong
| `Span
| `Small
| `Script
| `Svg
| `Samp
| `Ruby
| `Q
| `Mark
| `Kbd
| `Img
| `Picture
| `I
| `Em
| `Dfn
| `Datalist
| `Command
| `Code
| `Cite
| `Br
| `Bdo
| `B
| `Abbr
| `PCDATA
]
type core_phrasing_without_media = [
| labelable
| submitable
| `Wbr
| `Var
| `U
| `Time
| `Template
| `Svg
| `Sup
| `Sub
| `Strong
| `Span
| `Small
| `Script
| `Samp
| `Ruby
| `Q
| `Mark
| `Label
| `Kbd
| `Img
| `Img_interactive
| `Picture
| `Iframe
| `I
| `Embed
| `Em
| `Dfn
| `Datalist
| `Command
| `Code
| `Cite
| `Br
| `Bdo
| `B
| `Abbr
| `PCDATA
]
type phrasing_without_noscript =
(phrasing_without_interactive, phrasing, phrasing_without_media)
transparent_without_noscript
and phrasing_without_media = [
| core_phrasing_without_media
| (phrasing_without_interactive, phrasing_without_noscript, phrasing)
transparent_without_media
]
and phrasing_without_interactive = [
| core_phrasing_without_interactive
| (phrasing_without_noscript, phrasing, phrasing_without_media)
transparent_without_interactive
]
and phrasing = [
| (phrasing_without_interactive,
phrasing_without_noscript,
phrasing,
phrasing_without_media)
transparent
| core_phrasing
]
type (+'a, +'b) between_phrasing_and_phrasing_without_interactive =
[< core_phrasing
| ([< phrasing_without_interactive ] as 'b,
phrasing_without_noscript,
phrasing,
phrasing_without_media)
transparent Abbr B Bdo Br Canvas Cite Code Command Datalist Del Dfn Em I Img Picture Ins Kbd Map Mark Meter Noscript Object PCDATA Progress Q Ruby Samp Script Small Span Strong Sub Sup Svg Template Time U Var Wbr ] as 'a
type phrasing_without_dfn = [
| labelable
| submitable
| `Wbr
| `Var
| `U
| `Time
| `Template
| `Sup
| `Sub
| `Strong
| `Span
| `Small
| `Script
| `Samp
| `Ruby
| `Q
| `Mark
| `Label
| `Img
| `Img_interactive
| `Picture
| `Kbd
| `I
| `Em
| `Datalist
| `Command
| `Code
| `Cite
| `Br
| `Bdo
| `B
| `Abbr
| `PCDATA
| (phrasing_without_interactive,
phrasing_without_noscript,
phrasing_without_dfn,
phrasing_without_media)
transparent
]
Phrasing without the interactive markups
type phrasing_without_label = [
| labelable
| submitable
| `Wbr
| `Var
| `U
| `Time
| `Template
| `Sup
| `Sub
| `Strong
| `Span
| `Img
| `Img_interactive
| `Picture
| `Small
| `Script
| `Samp
| `Ruby
| `Q
| `Mark
| `Kbd
| `I
| `Em
| `Dfn
| `Datalist
| `Command
| `Code
| `Cite
| `Br
| `Bdo
| `B
| `Abbr
| `PCDATA
| (phrasing_without_interactive,
phrasing_without_noscript,
phrasing_without_label,
phrasing_without_media)
transparent
]
type phrasing_without_progress = [
| resetable
| submitable
| `Wbr
| `Var
| `U
| `Time
| `Template
| `Sup
| `Sub
| `Strong
| `Span
| `Small
| `Script
| `Samp
| `Img
| `Img_interactive
| `Picture
| `Ruby
| `Q
| `Meter
| `Mark
| `Label
| `Kbd
| `I
| `Em
| `Dfn
| `Datalist
| `Command
| `Code
| `Cite
| `Button
| `Br
| `Bdo
| `B
| `Abbr
| `PCDATA
| (phrasing_without_interactive,
phrasing_without_noscript,
phrasing_without_progress,
phrasing_without_media)
transparent
]
type phrasing_without_time = [
| labelable
| submitable
| `Wbr
| `Var
| `U
| `Template
| `Sup
| `Sub
| `Strong
| `Img
| `Img_interactive
| `Picture
| `Span
| `Small
| `Script
| `Samp
| `Ruby
| `Q
| `Mark
| `Label
| `Kbd
| `I
| `Em
| `Dfn
| `Datalist
| `Command
| `Code
| `Cite
| `Br
| `Bdo
| `B
| `Abbr
| `PCDATA
| (phrasing_without_interactive,
phrasing_without_noscript,
phrasing_without_time,
phrasing_without_media)
transparent
]
type phrasing_without_meter = [
| submitable
| resetable
| `Progress
| `Button
| `Wbr
| `Var
| `U
| `Time
| `Template
| `Sup
| `Img
| `Img_interactive
| `Picture
| `Sub
| `Strong
| `Span
| `Small
| `Script
| `Samp
| `Ruby
| `Q
| `Mark
| `Label
| `Kbd
| `I
| `Em
| `Dfn
| `Datalist
| `Command
| `Code
| `Cite
| `Br
| `Bdo
| `B
| `Abbr
| `PCDATA
| (phrasing_without_interactive,
phrasing_without_noscript,
phrasing_without_meter,
phrasing_without_media)
transparent
]
type core_flow5 = [
| core_phrasing
| formassociated
| formatblock
| `Ul
| `Table
| `Style
| `Ol
| `Menu
| `Hr
| `Form
| `Figure
| `Dl
| `Details
| `Main
| `Dialog
]
type core_flow5_without_interactive = [
| core_phrasing_without_interactive
| formassociated
| formatblock
| `Ul
| `Table
| `Style
| `Ol
| `Menu
| `Hr
| `Form
| `Figure
| `Dl
| `Main
| `Dialog
]
type core_flow5_without_noscript = [
| core_phrasing_without_noscript
| formassociated
| formatblock
| `Ul
| `Table
| `Style
| `Ol
| `Menu
| `Hr
| `Form
| `Figure
| `Dl
| `Details
| `Main
| `Dialog
]
type core_flow5_without_media = [
| core_phrasing_without_media
| formassociated
| formatblock
| `Ul
| `Table
| `Style
| `Ol
| `Menu
| `Hr
| `Form
| `Figure
| `Dl
| `Details
| `Main
| `Dialog
]
type flow5_without_interactive = [
| core_flow5_without_interactive
| (flow5_without_noscript, flow5, flow5_without_media)
transparent_without_interactive
]
and flow5_without_noscript = [
| core_flow5_without_noscript
| (flow5_without_interactive, flow5, flow5_without_media)
transparent_without_noscript
]
and flow5_without_media = [
| core_flow5_without_media
| (flow5_without_interactive, flow5_without_noscript, flow5)
transparent_without_media
]
and flow5 = [
| core_flow5
| (flow5_without_interactive, flow5_without_noscript, flow5, flow5_without_media)
transparent
]
type flow5_without_table = [
| core_phrasing
| formassociated
| formatblock
| `Ul
| `Style
| `Ol
| `Menu
| `Hr
| `Form
| `Figure
| `Dl
| `Details
| `Main
| `Dialog
| (flow5_without_interactive, flow5_without_noscript, flow5, flow5_without_media)
transparent
]
type flow5_without_form = [
| core_phrasing
| formassociated
| formatblock
| `Ul
| `Table
| `Style
| `Ol
| `Menu
| `Hr
| `Figure
| `Dl
| `Details
| `Main
| `Dialog
| (flow5_without_interactive, flow5_without_noscript, flow5, flow5_without_media)
transparent
]
type html_content = html_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 svg_content = Svg_types.svg_content
type svg_attrib = Svg_types.svg_attr
type base_content = notag
type base_content_fun = notag
type title_attrib = noattrib
type hr_content = notag
type hr_content_fun = notag
type wbr_content = notag
type wbr_content_fun = notag
type br_content = notag
type br_content_fun = notag
type a_content = flow5_without_interactive
type a_content_fun = flow5_without_interactive
type del_content = flow5
type del_ = del_content del
type del_content_fun = flow5
type ins_content = flow5
type ins_ = ins_content ins
type ins_content_fun = flow5
type iframe_attrib = [
| common
| `Allowfullscreen
| `Allowpaymentrequest
| `Src
| `Name
| `Sandbox
| `Seamless
| `Width
| `Height
| `Referrerpolicy
]
type object__content_fun = flow5
type object__ = object__content object_
type param_content = notag
type param_content_fun = notag
type embed_content = notag
type embed_content_fun = notag
type img_content = notag
type img_content_fun = notag
type audio_content = flow5_without_media
type audio_ = audio_content audio
type audio_content_fun = flow5_without_media
type video_content = flow5_without_media
type video_ = video_content video
type video_content_fun = flow5_without_media
type canvas_content = flow5
type canvas_ = canvas_content canvas
type canvas_content_fun = flow5
type source_content = notag
type source_content_fun = notag
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 = flow5
type map_ = map_content map
type map_content_fun = flow5
type col_content = notag
type col_content_fun = notag
type form_attrib = [
| common
| `Accept_charset
| `Action
| `Enctype
| `Method
| `Name
| `Target
| `Autocomplete
| `Novalidate
]
type input_content = notag
type input_content_fun = notag
type input_attrib = [
| common
| `Accept
| `Alt
| `Autocomplete
| `Autofocus
| `Checked
| `Disabled
| `Form
| `Formaction
| `Formenctype
| `Formmethod
| `Method
| `Formnovalidate
| `Formtarget
| `Height
| `List
| `Input_Max
| `Maxlength
| `Minlength
| `Input_Min
| `Multiple
| `Name
| `Pattern
| `Placeholder
| `ReadOnly
| `Required
| `Size
| `Src
| `Step
| `Input_Type
| `Value
| `Width
| `Inputmode
]
type textarea_attrib = [
| common
| `Autofocus
| `Disabled
| `Form
| `Maxlength
| `Minlength
| `Name
| `Placeholder
| `ReadOnly
| `Required
| `Wrap
| `Rows
| `Cols
]
type textarea_content_fun = textarea_content
type datalist_content = notag
type datalist_content_fun = notag
type keygen_content = notag
type keygen_content_fun = notag
type command_content = notag
type command_content_fun = notag
type noscript_content = flow5_without_noscript
type noscript_content_fun = flow5_without_noscript
type meta_content = notag
type meta_content_fun = notag
type script_attrib = [
| common
| subressource_integrity
| `Async
| `Charset
| `Src
| `Defer
| `Script_type
]
type link_content = notag
type link_content_fun = notag
type link_attrib = [
| common
| subressource_integrity
| `Hreflang
| `Media
| `Rel
| `Href
| `Sizes
| `Mime_type
]
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
| `Text
| `Decimal
| `Search
]