# Module type XHTML.T_01_01

    module type T_01_01 = T

An alias for XHTML 1.1 (for symmetry):
See also XHTML 1.1 - Module-based XHTML

The elements, attributes, attribute types and data types are given names that match the names in the W3C recommendation as closely as allowed by a strict typing discipline and the lexical conventions of O'Caml:

- elements are implemented as O'Caml constructors with the same name as in the W3C recommendation. The domain and codomain are specified as `'a elt`, where `'a` is a concrete phantom type build out of polymorphic variants.
- attributes are implemented as O'Caml constructors with `a_` prefixed to the name. The name is the same as in the W3C recommendation, unless an additional prefix is required to disambiguate:
  - `a_fs_rows` and `a_fs_cols` instead of `a_rows` and `a_cols` for framesets, because of the different argument types.
- attribute types are implemented as O'Caml types that all have the same names as in the W3C recommendation, but are all lowercase.
- data types are also implemented as O'Caml types that all have the same names as in the W3C recommendation and are again all lowercase.

Finite sets of alternatives are mapped to polymorphic variants.

The phantom type is always the most general required by any (supported) version of the standard. Type discipline is enforced by exporting or not-exporting the corresponding constructor.

# Attribute Types

    type cdata = string

Character data

    type id = string

A document-unique identifier

    type idref = string

A reference to a document-unique identifier

    type idrefs = idref list

A space-separated list of references to document-unique identifiers

    type name = string

A name with the same character constraints as ID above

    type nmtoken = string

A name composed of only name tokens as defined in XML 1.0
See also XML 1.0

    type nmtokens = nmtoken list

One or more white space separated NMTOKEN values

    type pcdata = string

Processed character data

## Data Types

    type character = char

A single character from ISO 10646.

    type charset = string

A character encoding, as per RFC2045 (MIME).
See also RFC2045

    type charsets = charset list

A space-separated list of character encodings, as per RFC2045 (MIME).
See also RFC2045

    type color = [ `Aqua
           | `Black
           | `Blue
           | `Fuchsia
           | `Gray
           | `Green
           | `Hex of string
           | `Lime
           | `Maroon
           | `Navy
           | `Olive
           | `Purple
           | `RGB of int * int * int
           | `Red
           | `Silver
           | `Teal
           | `White
           | `Yellow ]

The attribute value type `color` refers to color definitions as specified in SRGB. A color value may either be a hexadecimal number (prefixed by a hash mark) or one of the following sixteen color names. The color names are case-insensitive.
See also A Standard Default Color Space for the Internet.

    type contenttype = string

A media type, as per RFC2045 (MIME).
See also RFC2045

    type contenttypes = contenttype list

A comma-separated list of media types, as per RFC2045 (MIME).
See also RFC2045

    type coords = string list

Comma- separated list of coordinates to use in defining areas.

    type datetime = string

Date and time information.

    type fpi = string

A character string representing an SGML Formal Public Identifier.

    type frametarget = string

Frame name used as destination for results of certain actions.

    type languagecode = string

A language code, as per RFC3066.
See also RFC3066

    type length = [ `Percent of int | `Pixels of int ]

The value may be either in pixels or a percentage of the available horizontal or vertical space. Thus, the value ``Percent 50` means half of the available space.

    type linktypes = [ `Alternate
           | `Appendix
           | `Bookmark
           | `Chapter
           | `Contents
           | `Copyright
           | `Glossary
           | `Help
           | `Index
           | `Next
           | `Other of string
           | `Prev
           | `Section
           | `Start
           | `Stylesheet
           | `Subsection ] 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`: Designates substitute versions for the document in which the link occurs. When used together with the hreflang attribute, it implies a translated version of the document. When used together with the media attribute, it implies a version designed for a different medium (or media).
- ``Stylesheet`: Refers to an external style sheet. See the Style Module for details. This is used together with the link type `"Alternate"` for user-selectable alternate style sheets.
- ``Start`: Refers to the first document in a collection of documents. This link type tells search engines which document is considered by the author to be the starting point of the collection.
- ``Next`: Refers to the next document in a linear sequence of documents. User agents may choose to pre-load the "next" document, to reduce the perceived load time.
- ``Prev`: Refers to the previous document in an ordered series of documents. Some user agents also support the synonym "Previous".
- ``Contents`: Refers to a document serving as a table of contents. Some user agents also support the synonym ToC (from "Table of Contents").
- ``Index`: Refers to a document providing an index for the current document.
- ``Glossary`: Refers to a document providing a glossary of terms that pertain to the current document.
- ``Copyright`: Refers to a copyright statement for the current document.
- ``Chapter`: Refers to a document serving as a chapter in a collection of documents.
- ``Section`: Refers to a document serving as a section in a collection of documents.
- ``Subsection`: Refers to a document serving as a subsection in a collection of documents.
- ``Appendix`: Refers to a document serving as an appendix in a collection of documents.
- ``Help`: Refers to a document offering help (more information, links to other sources information, etc.)
- ``Bookmark`: Refers to a bookmark. A bookmark is a link to a key entry point within an extended document. The title attribute may be used, for example, to label the bookmark. Note that several bookmarks may be defined in each document.
- ``Other`: refers to any other type (for example `icon` or `shortcut`).

    type mediadesc = [ `All
           | `Aural
           | `Braille
           | `Handheld
           | `Print
           | `Projection
           | `Screen
           | `TTY
           | `TV ] list

The MediaDesc attribute is a comma-separated list of media descriptors. The following is a list of recognized media descriptors:

- ``Screen`: Intended for non-paged computer screens.
- ``TTY`: Intended for media using a fixed-pitch character grid, such as teletypes, terminals, or portable devices with limited display capabilities.
- ``TV`: Intended for television-type devices (low resolution, color, limited scrollability).
- ``Projection`: Intended for projectors.
- ``Handheld`: Intended for handheld devices (small screen, monochrome, bitmapped graphics, limited bandwidth).
- ``Print`: Intended for paged, opaque material and for documents viewed on screen in print preview mode.
- ``Braille`: Intended for braille tactile feedback devices.
- ``Aural`: Intended for speech synthesizers.
- ``All`: Suitable for all devices.

Future versions of XHTML may introduce new values and may allow parameterized values. To facilitate the introduction of these extensions, conforming user agents must be able to parse the media attribute value as follows:

1. The value is a comma-separated list of entries. For example, `media="screen, 3d-glasses, print and resolution > 90dpi"` is mapped to: `"screen"`, `"3d-glasses"`, `"print and resolution > 90dpi"`.
2. Each entry is truncated just before the first character that isn't a US ASCII letter `[a-zA-Z]` (ISO 10646 hex 41-5a, 61-7a), digit `[0-9]` (hex 30-39), or hyphen-minus (hex 2d). In the example, this gives: `"screen"`, `"3d-glasses"`, `"print"`.
3. A case-insensitive match is then made with the set of media types defined above. User agents may ignore entries that don't match. In the example we are left with `"screen"` and `"print"`.

Note. Style sheets may include media-dependent variations within them (e.g., the `CSS @media` construct). In such cases it may be appropriate to use `"media=all"`.

    type multilength = [ `Percent of int | `Pixels of int | `Relative of int ]

The value may be a Length or a relative length. A relative length has the form `"i*"`, where `"i"` is an integer. When allotting space among elements competing for that space, user agents allot pixel and percentage lengths first, then divide up remaining available space among relative lengths. Each relative length receives a portion of the available space that is proportional to the integer preceding the `"*"`. The value `"*"` is equivalent to `"1*"`. Thus, if 60 pixels of space are available after the user agent allots pixel and percentage space, and the competing relative lengths are `"1*"`, `"2*"`, and `"3*"`, the `"1*"` will be allotted 10 pixels, the `"2*"` will be allotted 20 pixels, and the `"3*"` will be allotted 30 pixels.

    type multilengths = multilength list

A comma separated list of items of type MultiLength.

    type number = int

One or more digits.

    type pixels = int

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.

    type script = string

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 text = string

Arbitrary textual data, likely meant to be human-readable.

    type uri

    val uri_of_string : string -> uri

    val string_of_uri : uri -> string

A Uniform Resource Identifier, as per RFC2396.
See also RFC2396

    type uris = uri

A space-separated list of Uniform Resource Identifiers, as per RFC2396.
See also RFC2396

# Common Attributes

    type +'a attrib

    type +'a attribs

    val to_xmlattribs : 'a attrib list -> XML.attrib list

`'a` is known as a phantom type. The implementation is actually monomorphic (the different element types are distinguished by a homogeneous variable, such as their textual representation) and the type variable ``a` is just used by the type checker.

NB: It might be possible to use polymorphic variants directly, without phantom types, but the implementation is likely to be more involved.

## Core

    type core = [ `Class | `Id | `Title ]

    val a_class : nmtokens -> [> `Class ] attrib

This attribute assigns a class name or set of class names to an element. Any number of elements may be assigned the same class name or names.

    val a_id : id -> [> `Id ] attrib

This attribute assigns a name to an element. This name must be unique in a document.

    val a_title : cdata -> [> `Title ] attrib

This attribute offers advisory information about the element for which it is set.
Values of the title attribute may be rendered by user agents in a variety of ways. For instance, visual browsers frequently display the title as a tool tip (a short message that appears when the pointing device pauses over an object). Audio user agents may speak the title information in a similar context.
The title attribute has an additional role when used with the `link` element to designate an external style sheet. Please consult the section on links and style sheets for details.

## I18N

    type i18n = [ `XML_lang ]

    val a_xml_lang : nmtoken -> [> `XML_lang ] attrib

## Style

The Style collection is deprecated, because the Style Attribute Module is deprecated.

    type common = [ `Class | `Id | `Title | `XML_lang ]

# Modules, Element Sets and Attributes

## 5.2. Core Modules

### 5.2.1. Structure Module

    module STRUCTURE: sig .. end

    val a_profile : uri -> [> `Profile ] attrib

    val a_version : cdata -> [> `Version ] attrib

    val a_xmlns : [< `W3_org_1999_xhtml ] -> [> `XMLns ] attrib

### 5.2.2. Text Module

    module TEXT: sig .. end

    val a_cite : uri -> [> `Cite ] attrib

    val a_xml_space : [< `Preserve ] -> [> `XML_space ] attrib

### 5.2.3. Hypertext Module

    module HYPERTEXT: sig .. end

    val a_accesskey : character -> [> `Accesskey ] attrib

This attribute assigns an access key to an element. An access key is a single character from the document character set. NB: authors should consider the input method of the expected reader when specifying an accesskey.

    val a_charset : charset -> [> `Charset ] attrib

This attribute specifies the character encoding of the resource designated by the link. Please consult the section on character encodings for more details.

    val a_accept_charset : charset -> [> `Accept_charset ] attrib

    val a_accept : contenttype -> [> `Accept ] attrib

    val a_href : uri -> [> `Href ] attrib

This attribute specifies the location of a Web resource, thus defining a link between the current element (the source anchor) and the destination anchor defined by this attribute.

    val a_hreflang : languagecode -> [> `Hreflang ] attrib

This attribute specifies the base language of the resource designated by href and may only be used when href is specified.

    val a_rel : linktypes -> [> `Rel ] attrib

This attribute describes the relationship from the current document to the anchor specified by the href attribute. The value of this attribute is a space-separated list of link types.

    val a_rev : linktypes -> [> `Rev ] attrib

This attribute is used to describe a reverse link from the anchor specified by the href attribute to the current document. The value of this attribute is a space-separated list of link types.

    val a_tabindex : number -> [> `Tabindex ] attrib

This attribute specifies the position of the current element in the tabbing order for the current document. This value must be a number between 0 and 32767. User agents should ignore leading zeros.

    val a_type : contenttype -> [> `Type ] attrib

This attribute gives an advisory hint as to the content type of the content available at the link target address. It allows user agents to opt to use a fallback mechanism rather than fetch the content if they are advised that they will get content in a content type they do not support.Authors who use this attribute take responsibility to manage the risk that it may become inconsistent with the content available at the link target address.

### 5.2.3. List Module

    module LIST: sig .. end

## 5.3. Applet Module

This module is deprecated. Similar functionality can be found in the Object Module.

## 5.4. Text Extension Modules

### 5.4.1. Presentation Module

    module PRESENTATION: sig .. end

### 5.4.2. Edit Module

    val a_datetime : cdata -> [> `Datetime ] attrib

### 5.4.3. Bi-directional Text Module

    val a_dir : [< `Ltr | `Rtl ] -> [> `Dir ] attrib

## 5.5. Forms Modules

### 5.5.1. Basic Forms Module

    module FORMS: sig .. end

    val a_action : uri -> [> `Action ] attrib

This attribute specifies a form processing agent. User agent behavior for a value other than an HTTP URI is undefined.

    val a_checked : [< `Checked ] -> [> `Checked ] attrib

When the `type` attribute has the value `"radio"` or `"checkbox"`, this boolean attribute specifies that the button is on. User agents must ignore this attribute for other control types.

    val a_cols : number -> [> `Cols ] attrib

This attribute specifies the visible width in average character widths. Users should be able to enter longer lines than this, so user agents should provide some means to scroll through the contents of the control when the contents extend beyond the visible area. User agents may wrap visible text lines to keep long lines visible without the need for scrolling.

    val a_enctype : contenttype -> [> `Enctype ] attrib

    val a_for : idref -> [> `For ] attrib

    val a_maxlength : number -> [> `Maxlength ] attrib

    val a_method : [< `Get | `Post ] -> [> `Method ] attrib

    val a_multiple : [< `Multiple ] -> [> `Multiple ] attrib

    val a_name : cdata -> [> `Name ] attrib

This attribute assigns the control name.

    val a_rows : number -> [> `Rows ] attrib

This attribute specifies the number of visible text lines. Users should be able to enter more lines than this, so user agents should provide some means to scroll through the contents of the control when the contents extend beyond the visible area.

    val a_selected : [< `Selected ] -> [> `Selected ] attrib

When set, this boolean attribute specifies that this option is pre-selected.

    val a_size : number -> [> `Size ] attrib

    val a_src : uri -> [> `Src ] attrib

    val a_input_type : [< `Button
            | `Checkbox
            | `File
            | `Hidden
            | `Image
            | `Password
            | `Radio
            | `Reset
            | `Submit
            | `Text ] ->
           [> `Input_Type ] attrib

    val a_value : cdata -> [> `Value ] attrib

This attribute specifies the initial value of the control. If this attribute is not set, the initial value is set to the contents of the `option` element.

### 5.5.2. Forms Module

    val a_disabled : [< `Disabled ] -> [> `Disabled ] attrib

    val a_readonly : [< `Readonly ] -> [> `Readonly ] attrib

    val a_button_type : [< `Button | `Reset | `Submit ] -> [> `Button_Type ] attrib

    val a_label : text -> [> `Label ] attrib

## 5.6. Table Modules

### 5.6.1. Basic Tables Module

    module TABLES: sig .. end

    val a_abbr : text -> [> `Abbr ] attrib

    val a_align : [< `Center | `Char | `Justify | `Left | `Right ] ->
           [> `Align ] attrib

    val a_axis : cdata -> [> `Axis ] attrib

    val a_colspan : number -> [> `Colspan ] attrib

    val a_headers : idrefs -> [> `Headers ] attrib

    val a_rowspan : number -> [> `Rowspan ] attrib

    val a_scope : [< `Col | `Colgroup | `Row | `Rowgroup ] -> [> `Scope ] attrib

    val a_summary : text -> [> `Summary ] attrib

    val a_valign : [< `Baseline | `Bottom | `Middle | `Top ] -> [> `Valign ] attrib

### 5.6.2. Tables Module

    val a_border : pixels -> [> `Border ] attrib

    val a_cellpadding : length -> [> `Cellpadding ] attrib

    val a_cellspacing : length -> [> `Cellspacing ] attrib

    val a_datapagesize : cdata -> [> `Datapagesize ] attrib

    val a_frame : [< `Above | `Below | `Border | `Box | `Hsides | `LHS | `RHS | `Void | `Vsides ] ->
           [> `Frame ] attrib

    val a_rules : [< `All | `Cols | `Groups | `None | `Rows ] -> [> `Rules ] attrib

    val a_char : character -> [> `Char ] attrib

    val a_charoff : length -> [> `Charoff ] attrib

## 5.7. Image Module

    module IMAGE: sig .. end

    val a_alt : text -> [> `Alt ] attrib

    val a_height : length -> [> `Height ] attrib

    val a_longdesc : uri -> [> `Longdesc ] attrib

    val a_width : length -> [> `Width ] attrib

## 5.8. Client-side Image Map Module

    type shape = [ `Circle | `Default | `Poly | `Rect ]

    val a_shape : shape -> [> `Shape ] attrib

    val a_coords : int list -> [> `Coords ] attrib

    val a_nohref : [< `Nohref ] -> [> `Nohref ] attrib

    val a_usemap : idref -> [> `Usemap ] attrib

## 5.9. Server-side Image Map Module

## 5.10. Object Module

    val a_declare : [< `Declare ] -> [> `Declare ] attrib

    val a_classid : uri -> [> `Classid ] attrib

    val a_codebase : uri -> [> `Codebase ] attrib

    val a_data : uri -> [> `Data ] attrib

    val a_codetype : contenttype -> [> `Codetype ] attrib

    val a_archive : uris -> [> `Archive ] attrib

    val a_standby : text -> [> `Standby ] attrib

## 5.11. Frames Module

    val a_fs_rows : multilengths -> [> `FS_Rows ] attrib

    val a_fs_cols : multilengths -> [> `FS_Cols ] attrib

    val a_frameborder : [< `One | `Zero ] -> [> `Frameborder ] attrib

    val a_marginheight : pixels -> [> `Marginheight ] attrib

    val a_marginwidth : pixels -> [> `Marginwidth ] attrib

    val a_noresize : [< `Noresize ] -> [> `Noresize ] attrib

    val a_scrolling : [< `Auto | `No | `Yes ] -> [> `Scrolling ] attrib

## 5.12. Target Module

    val a_target : frametarget -> [> `Target ] attrib

## 5.13. Iframe Module

## 5.14. Intrinsic Events Module

## 5.15. Metainformation Module

    module METAINFORMATION: sig .. end

    val a_content : cdata -> [> `Content ] attrib

    val a_http_equiv : nmtoken -> [> `Http_equiv ] attrib

    val a_scheme : cdata -> [> `Scheme ] attrib

## 5.16. Scripting Module

    val a_defer : [< `Defer ] -> [> `Defer ] attrib

## 5.17. Style Sheet Module

    module STYLE_SHEET: sig .. end

    val a_media : mediadesc -> [> `Media ] attrib

## 5.18. Style Attribute Module

## 5.19. Link Module

    module LINK: sig .. end

## 5.20. Base Module

    module BASE: sig .. end

## 5.21. Name Identification Module

This module is deprecated in XHTML 1.1, but supported for XHTML 1.0 using ``Name_01_00` .

## 5.22. Legacy Module

    type edit = [ `Del | `Ins ]

    type scripttag = [ `Noscript | `Script ]

    type misc = [ `Del | `Ins | `Noscript | `Script ]

    module SPECIAL: sig .. end

    type i18nclass = [ `Bdo ]

# Combined Element Sets:

    type block = [ `Address
           | `Blockquote
           | `Del
           | `Div
           | `Dl
           | `Fieldset
           | `Form
           | `H1
           | `H2
           | `H3
           | `H4
           | `H5
           | `H6
           | `Hr
           | `Ins
           | `Noscript
           | `Ol
           | `P
           | `Pre
           | `Script
           | `Table
           | `Ul ]

    type block_sans_form = [ `Address
           | `Blockquote
           | `Del
           | `Div
           | `Dl
           | `H1
           | `H2
           | `H3
           | `H4
           | `H5
           | `H6
           | `Hr
           | `Ins
           | `Noscript
           | `Ol
           | `P
           | `Pre
           | `Script
           | `Table
           | `Ul ]

    type flow = [ `A
           | `Abbr
           | `Acronym
           | `Address
           | `B
           | `Bdo
           | `Big
           | `Blockquote
           | `Br
           | `Button
           | `Cite
           | `Code
           | `Del
           | `Dfn
           | `Div
           | `Dl
           | `Em
           | `Fieldset
           | `Form
           | `H1
           | `H2
           | `H3
           | `H4
           | `H5
           | `H6
           | `Hr
           | `I
           | `Img
           | `Input
           | `Ins
           | `Kbd
           | `Label
           | `Map
           | `Noscript
           | `Object
           | `Ol
           | `P
           | `Pre
           | `Q
           | `Samp
           | `Script
           | `Select
           | `Small
           | `Span
           | `Strong
           | `Sub
           | `Sup
           | `Table
           | `Textarea
           | `Tt
           | `Ul
           | `Var ]

    type flow_sans_table = [ `A
           | `Abbr
           | `Acronym
           | `Address
           | `B
           | `Bdo
           | `Big
           | `Blockquote
           | `Br
           | `Button
           | `Cite
           | `Code
           | `Del
           | `Dfn
           | `Div
           | `Dl
           | `Em
           | `Fieldset
           | `Form
           | `H1
           | `H2
           | `H3
           | `H4
           | `H5
           | `H6
           | `Hr
           | `I
           | `Img
           | `Input
           | `Ins
           | `Kbd
           | `Label
           | `Map
           | `Noscript
           | `Object
           | `Ol
           | `P
           | `Pre
           | `Q
           | `Samp
           | `Script
           | `Select
           | `Small
           | `Span
           | `Strong
           | `Sub
           | `Sup
           | `Table
           | `Textarea
           | `Tt
           | `Ul
           | `Var ]

    type inline = [ `A
           | `Abbr
           | `Acronym
           | `B
           | `Bdo
           | `Big
           | `Br
           | `Button
           | `Cite
           | `Code
           | `Del
           | `Dfn
           | `Em
           | `I
           | `Img
           | `Input
           | `Ins
           | `Kbd
           | `Label
           | `Map
           | `Noscript
           | `Object
           | `Q
           | `Samp
           | `Script
           | `Select
           | `Small
           | `Span
           | `Strong
           | `Sub
           | `Sup
           | `Textarea
           | `Tt
           | `Var ]

    type inline_sans_a_mix = [ `Abbr
           | `Acronym
           | `B
           | `Bdo
           | `Big
           | `Br
           | `Button
           | `Cite
           | `Code
           | `Del
           | `Dfn
           | `Em
           | `I
           | `Img
           | `Input
           | `Ins
           | `Kbd
           | `Label
           | `Map
           | `Noscript
           | `Object
           | `Q
           | `Samp
           | `Script
           | `Select
           | `Small
           | `Span
           | `Strong
           | `Sub
           | `Sup
           | `Textarea
           | `Tt
           | `Var ]

    type buttoncontent = [ `Abbr
           | `Acronym
           | `Address
           | `B
           | `Bdo
           | `Big
           | `Blockquote
           | `Br
           | `Cite
           | `Code
           | `Del
           | `Dfn
           | `Div
           | `Dl
           | `Em
           | `H1
           | `H2
           | `H3
           | `H4
           | `H5
           | `H6
           | `Hr
           | `I
           | `Img
           | `Ins
           | `Kbd
           | `Map
           | `Noscript
           | `Object
           | `Ol
           | `P
           | `Pre
           | `Q
           | `Samp
           | `Script
           | `Small
           | `Span
           | `Strong
           | `Sub
           | `Sup
           | `Table
           | `Tt
           | `Ul
           | `Var ]

    type precontent = [ `A
           | `Abbr
           | `Acronym
           | `B
           | `Bdo
           | `Br
           | `Cite
           | `Code
           | `Dfn
           | `Em
           | `I
           | `Kbd
           | `Map
           | `Q
           | `Samp
           | `Script
           | `Span
           | `Strong
           | `Tt
           | `Var ]

    type inline_sans_label = [ `A
           | `Abbr
           | `Acronym
           | `B
           | `Bdo
           | `Big
           | `Br
           | `Button
           | `Cite
           | `Code
           | `Del
           | `Dfn
           | `Em
           | `I
           | `Img
           | `Input
           | `Ins
           | `Kbd
           | `Map
           | `Noscript
           | `Object
           | `Q
           | `Samp
           | `Script
           | `Select
           | `Small
           | `Span
           | `Strong
           | `Sub
           | `Sup
           | `Textarea
           | `Tt
           | `Var ]

    type heading = TEXT.heading

# Elements

    type +'a elt

## Element Constructor Types

    type ('a, 'b) nullary = ?a:'a attrib list -> unit -> 'b elt

    type ('a, 'b, 'c) unary = ?a:'a attrib list -> 'b elt -> 'c elt

    type ('a, 'b, 'c, 'd) binary = ?a:'a attrib list ->
           'b elt -> 'c elt -> 'd elt

    type ('a, 'b, 'c) star = ?a:'a attrib list -> 'b elt list -> 'c elt

Star '*' denotes any number of children, uncluding zero.

    type ('a, 'b, 'c) plus = ?a:'a attrib list ->
           'b elt -> 'b elt list -> 'c elt

Plus '+' requires at least one child.

## Structure

    type html = [ `Html ] elt

    val html : ?a:[< `Version | `XML_lang | `XMLns ] attrib list ->
           [< `Head ] elt -> [< `Body | `Frameset ] elt -> html

    val head : ?a:[< `Profile | `XML_lang ] attrib list ->
           [< `Base | `Title ] elt ->
           [< `Link | `Meta | `Object | `Script | `Style ] elt list ->
           [> `Head ] elt

    val title : ([< i18n ], [< `PCDATA ], [> `Title ]) unary

    val body : ([< common ], [< block ], [> `Body ]) star

## Data

    val pcdata : string -> [> `PCDATA ] elt

    val entity : string -> [> `PCDATA ] elt

    val space : unit -> [> `PCDATA ] elt

    val cdata : string -> [> `PCDATA ] elt

    val cdata_script : string -> [> `PCDATA ] elt

    val cdata_style : string -> [> `PCDATA ] elt

## Text

    val h1 : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `H1 ])
           star

    val h2 : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `H2 ])
           star

    val h3 : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `H3 ])
           star

    val h4 : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `H4 ])
           star

    val h5 : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `H5 ])
           star

    val h6 : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `H6 ])
           star

    val address : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `Address ])
           star

    val blockquote : ([< `Cite | `Class | `Id | `Title | `XML_lang ],
            [< `Address
             | `Blockquote
             | `Del
             | `Div
             | `Dl
             | `Fieldset
             | `Form
             | `H1
             | `H2
             | `H3
             | `H4
             | `H5
             | `H6
             | `Hr
             | `Ins
             | `Noscript
             | `Ol
             | `P
             | `PCDATA
             | `Pre
             | `Script
             | `Table
             | `Ul ],
            [> `Blockquote ])
           star

    val div : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `Address
             | `B
             | `Bdo
             | `Big
             | `Blockquote
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Div
             | `Dl
             | `Em
             | `Fieldset
             | `Form
             | `H1
             | `H2
             | `H3
             | `H4
             | `H5
             | `H6
             | `Hr
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `Ol
             | `P
             | `PCDATA
             | `Pre
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Table
             | `Textarea
             | `Tt
             | `Ul
             | `Var ],
            [> `Div ])
           star

    val p : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `P ])
           star

    val pre : ([< `Class | `Id | `Title | `XML_lang | `XML_space ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Br
             | `Cite
             | `Code
             | `Dfn
             | `Em
             | `I
             | `Kbd
             | `Map
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Span
             | `Strong
             | `Tt
             | `Var ],
            [> `Pre ])
           star

    val abbr : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `Abbr ])
           star

    val acronym : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `Acronym ])
           star

    val br : ([< core ], [> `Br ]) nullary

    val cite : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `Cite ])
           star

    val code : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `Code ])
           star

    val dfn : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `Dfn ])
           star

    val em : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `Em ])
           star

    val kbd : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `Kbd ])
           star

    val q : ([< `Cite | `Class | `Id | `Title | `XML_lang ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `Q ])
           star

    val samp : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `Samp ])
           star

    val span : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `Span ])
           star

    val strong : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `Strong ])
           star

    val var : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `Var ])
           star

## Hypertext

    val a : ([< `Accesskey
             | `Charset
             | `Class
             | `Coords
             | `Href
             | `Hreflang
             | `Id
             | `Name_01_00
             | `Rel
             | `Rev
             | `Shape
             | `Tabindex
             | `Target
             | `Title
             | `Type
             | `XML_lang ],
            [< `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `A ])
           star

## List

    val dl : ([< common ], [< `Dd | `Dt ], [> `Dl ]) plus

    val ol : ([< common ], [< `Li ], [> `Ol ]) plus

    val ul : ([< common ], [< `Li ], [> `Ul ]) plus

    val dd : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `Address
             | `B
             | `Bdo
             | `Big
             | `Blockquote
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Div
             | `Dl
             | `Em
             | `Fieldset
             | `Form
             | `H1
             | `H2
             | `H3
             | `H4
             | `H5
             | `H6
             | `Hr
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `Ol
             | `P
             | `PCDATA
             | `Pre
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Table
             | `Textarea
             | `Tt
             | `Ul
             | `Var ],
            [> `Dd ])
           star

    val dt : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `Dt ])
           star

    val li : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `Address
             | `B
             | `Bdo
             | `Big
             | `Blockquote
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Div
             | `Dl
             | `Em
             | `Fieldset
             | `Form
             | `H1
             | `H2
             | `H3
             | `H4
             | `H5
             | `H6
             | `Hr
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `Ol
             | `P
             | `PCDATA
             | `Pre
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Table
             | `Textarea
             | `Tt
             | `Ul
             | `Var ],
            [> `Li ])
           star

## Presentation

    val hr : ([< common ], [> `Hr ]) nullary

    val b : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `B ])
           star

    val big : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `Big ])
           star

    val i : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `I ])
           star

    val small : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `Small ])
           star

    val sub : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `Sub ])
           star

    val sup : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `Sup ])
           star

    val tt : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `Tt ])
           star

    val bdo : ([< `Class | `Dir | `Id | `Title | `XML_lang ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `Bdo ])
           star

    val area : alt:text ->
           ([< `Accesskey
             | `Class
             | `Coords
             | `Href
             | `Id
             | `Nohref
             | `Shape
             | `Tabindex
             | `Title
             | `XML_lang ],
            [> `Area ])
           nullary

    val map : id:id ->
           ([< `Class | `Title | `XML_lang | `XMLns ],
            [< `Address
             | `Area
             | `Blockquote
             | `Del
             | `Div
             | `Dl
             | `Fieldset
             | `Form
             | `H1
             | `H2
             | `H3
             | `H4
             | `H5
             | `H6
             | `Hr
             | `Ins
             | `Noscript
             | `Ol
             | `P
             | `Pre
             | `Script
             | `Table
             | `Ul ],
            [> `Map ])
           plus

    val del : ([< `Cite | `Class | `Datetime | `Id | `Title | `XML_lang ],
            [< `A
             | `Abbr
             | `Acronym
             | `Address
             | `B
             | `Bdo
             | `Big
             | `Blockquote
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Div
             | `Dl
             | `Em
             | `Fieldset
             | `Form
             | `H1
             | `H2
             | `H3
             | `H4
             | `H5
             | `H6
             | `Hr
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `Ol
             | `P
             | `PCDATA
             | `Pre
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Table
             | `Textarea
             | `Tt
             | `Ul
             | `Var ],
            [> `Del ])
           star

    val ins : ([< `Cite | `Class | `Datetime | `Id | `Title | `XML_lang ],
            [< `A
             | `Abbr
             | `Acronym
             | `Address
             | `B
             | `Bdo
             | `Big
             | `Blockquote
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Div
             | `Dl
             | `Em
             | `Fieldset
             | `Form
             | `H1
             | `H2
             | `H3
             | `H4
             | `H5
             | `H6
             | `Hr
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `Ol
             | `P
             | `PCDATA
             | `Pre
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Table
             | `Textarea
             | `Tt
             | `Ul
             | `Var ],
            [> `Ins ])
           star

    val script : contenttype:contenttype ->
           ([< `Charset | `Defer | `Src | `XML_space | `XMLns ], [< `PCDATA ],
            [> `Script ])
           unary

    val noscript : ([< common ], [< block ], [> `Noscript ]) plus

## Forms

### Basic Forms

One can use `open Basic_Forms` to enable basic forms.

    module Basic_Forms: sig .. end

### Forms

    val form : action:uri ->
           ([< `Accept
             | `Accept_charset
             | `Class
             | `Enctype
             | `Id
             | `Method
             | `Name_01_00
             | `Target
             | `Title
             | `XML_lang ],
            [< `Address
             | `Blockquote
             | `Del
             | `Div
             | `Dl
             | `Fieldset
             | `H1
             | `H2
             | `H3
             | `H4
             | `H5
             | `H6
             | `Hr
             | `Ins
             | `Noscript
             | `Ol
             | `P
             | `Pre
             | `Script
             | `Table
             | `Ul ],
            [> `Form ])
           plus

Generic forms. WARNING: If you find a bug or if something is missing please send a bug report to the Ocsigen project! -- VB

    val input : ([< `Accept
             | `Accesskey
             | `Alt
             | `Checked
             | `Class
             | `Disabled
             | `Id
             | `Input_Type
             | `Maxlength
             | `Name
             | `Readonly
             | `Size
             | `Src
             | `Tabindex
             | `Title
             | `Usemap
             | `Value
             | `XML_lang ],
            [> `Input ])
           nullary

    val label : ([< `Accesskey | `Class | `For | `Id | `Title | `XML_lang ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `Label ])
           star

    val optgroup : label:text ->
           ([< `Class | `Disabled | `Id | `Title | `XML_lang ], [< `Option ],
            [> `Optgroup ])
           plus

    val option : ([< `Class
             | `Disabled
             | `Id
             | `Label
             | `Selected
             | `Title
             | `Value
             | `XML_lang ],
            [< `PCDATA ], [> `Option ])
           unary

    val select : ([< `Class
             | `Disabled
             | `Id
             | `Multiple
             | `Name
             | `Size
             | `Tabindex
             | `Title
             | `XML_lang ],
            [< `Optgroup | `Option ], [> `Select ])
           plus

    val textarea : rows:number ->
           cols:number ->
           ([< `Accesskey
             | `Class
             | `Disabled
             | `Id
             | `Name
             | `Readonly
             | `Tabindex
             | `Title
             | `XML_lang ],
            [< `PCDATA ], [> `Textarea ])
           unary

    val fieldset : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `Address
             | `B
             | `Bdo
             | `Big
             | `Blockquote
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Div
             | `Dl
             | `Em
             | `Fieldset
             | `Form
             | `H1
             | `H2
             | `H3
             | `H4
             | `H5
             | `H6
             | `Hr
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Legend
             | `Map
             | `Noscript
             | `Object
             | `Ol
             | `P
             | `PCDATA
             | `Pre
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Table
             | `Textarea
             | `Tt
             | `Ul
             | `Var ],
            [> `Fieldset ])
           star

    val legend : ([< `Accesskey | `Class | `Id | `Title | `XML_lang ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `Legend ])
           star

    val button : ([< `Button_Type | `Class | `Id | `Name | `Title | `Value | `XML_lang ],
            [< `Abbr
             | `Acronym
             | `Address
             | `B
             | `Bdo
             | `Big
             | `Blockquote
             | `Br
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Div
             | `Dl
             | `Em
             | `H1
             | `H2
             | `H3
             | `H4
             | `H5
             | `H6
             | `Hr
             | `I
             | `Img
             | `Ins
             | `Kbd
             | `Map
             | `Noscript
             | `Object
             | `Ol
             | `P
             | `PCDATA
             | `Pre
             | `Q
             | `Samp
             | `Script
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Table
             | `Tt
             | `Ul
             | `Var ],
            [> `Button ])
           star

## Tables

### Basic Tables

One can use `open Basic_Tables` to switch globally to basic tables.

    module Basic_Tables: sig .. end

### Tables

    val caption : ([< common ],
            [< `A
             | `Abbr
             | `Acronym
             | `B
             | `Bdo
             | `Big
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Em
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `PCDATA
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Textarea
             | `Tt
             | `Var ],
            [> `Caption ])
           star

    val table : ?caption:[< `Caption ] elt ->
           ?columns:[< `Colgroups of [< `Colgroup ] elt list
                     | `Cols of [< `Col ] elt list ] ->
           ([< `Border
             | `Cellpadding
             | `Cellspacing
             | `Class
             | `Datapagesize
             | `Frame
             | `Id
             | `Rules
             | `Summary
             | `Title
             | `Width
             | `XML_lang ],
            [< `Tr ], [> `Table ])
           plus

    val tablex : ?caption:[< `Caption ] elt ->
           ?columns:[< `Colgroups of [< `Colgroup ] elt list
                     | `Cols of [< `Col ] elt list ] ->
           ?thead:[< `Thead ] elt ->
           ?tfoot:[< `Tfoot ] elt ->
           ([< `Border
             | `Cellpadding
             | `Cellspacing
             | `Class
             | `Datapagesize
             | `Frame
             | `Id
             | `Rules
             | `Summary
             | `Title
             | `Width
             | `XML_lang ],
            [< `Tbody ], [> `Table ])
           plus

    val td : ([< `Abbr
             | `Align
             | `Axis
             | `Char
             | `Charoff
             | `Class
             | `Colspan
             | `Headers
             | `Id
             | `Rowspan
             | `Scope
             | `Title
             | `Valign
             | `XML_lang ],
            [< `A
             | `Abbr
             | `Acronym
             | `Address
             | `B
             | `Bdo
             | `Big
             | `Blockquote
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Div
             | `Dl
             | `Em
             | `Fieldset
             | `Form
             | `H1
             | `H2
             | `H3
             | `H4
             | `H5
             | `H6
             | `Hr
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `Ol
             | `P
             | `PCDATA
             | `Pre
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Table
             | `Textarea
             | `Tt
             | `Ul
             | `Var ],
            [> `Td ])
           star

    val th : ([< `Abbr
             | `Align
             | `Axis
             | `Char
             | `Charoff
             | `Class
             | `Colspan
             | `Headers
             | `Id
             | `Rowspan
             | `Scope
             | `Title
             | `Valign
             | `XML_lang ],
            [< `A
             | `Abbr
             | `Acronym
             | `Address
             | `B
             | `Bdo
             | `Big
             | `Blockquote
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Div
             | `Dl
             | `Em
             | `Fieldset
             | `Form
             | `H1
             | `H2
             | `H3
             | `H4
             | `H5
             | `H6
             | `Hr
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `Ol
             | `P
             | `PCDATA
             | `Pre
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Table
             | `Textarea
             | `Tt
             | `Ul
             | `Var ],
            [> `Th ])
           star

    val tr : ([< `Align | `Char | `Charoff | `Class | `Id | `Title | `Valign | `XML_lang ],
            [< `Td | `Th ], [> `Tr ])
           plus

    val col : ([< `Align
             | `Char
             | `Charoff
             | `Class
             | `Id
             | `Span
             | `Title
             | `Valign
             | `Width
             | `XML_lang ],
            [> `Col ])
           nullary

    val colgroup : ([< `Align
             | `Char
             | `Charoff
             | `Class
             | `Id
             | `Span
             | `Title
             | `Valign
             | `Width
             | `XML_lang ],
            [< `Col ], [> `Colgroup ])
           star

    val thead : ([< `Align | `Char | `Charoff | `Class | `Id | `Title | `Valign | `XML_lang ],
            [< `Tr ], [> `Thead ])
           plus

    val tbody : ([< `Align | `Char | `Charoff | `Class | `Id | `Title | `Valign | `XML_lang ],
            [< `Tr ], [> `Tbody ])
           plus

    val tfoot : ([< `Align | `Char | `Charoff | `Class | `Id | `Title | `Valign | `XML_lang ],
            [< `Tr ], [> `Tfoot ])
           plus

## Image

    val img : src:uri ->
           alt:text ->
           ([< `Class
             | `Height
             | `Id
             | `Longdesc
             | `Name_01_00
             | `Title
             | `Usemap
             | `Width
             | `XML_lang ],
            [> `Img ])
           nullary

## Object

VB

    val object_ : ([< `Archive
             | `Class
             | `Classid
             | `Codebase
             | `Codetype
             | `Data
             | `Declare
             | `Height
             | `Id
             | `Name
             | `Standby
             | `Tabindex
             | `Title
             | `Type
             | `Width
             | `XML_lang ],
            [< `A
             | `Abbr
             | `Acronym
             | `Address
             | `B
             | `Bdo
             | `Big
             | `Blockquote
             | `Br
             | `Button
             | `Cite
             | `Code
             | `Del
             | `Dfn
             | `Div
             | `Dl
             | `Em
             | `Fieldset
             | `Form
             | `H1
             | `H2
             | `H3
             | `H4
             | `H5
             | `H6
             | `Hr
             | `I
             | `Img
             | `Input
             | `Ins
             | `Kbd
             | `Label
             | `Map
             | `Noscript
             | `Object
             | `Ol
             | `P
             | `PCDATA
             | `Param
             | `Pre
             | `Q
             | `Samp
             | `Script
             | `Select
             | `Small
             | `Span
             | `Strong
             | `Sub
             | `Sup
             | `Table
             | `Textarea
             | `Tt
             | `Ul
             | `Usemap
             | `Var ],
            [> `Object ])
           star

## Frames

    val frameset : ?noframes:[< `Noframes ] elt ->
           ([< `Class | `FS_Cols | `FS_Rows | `Id | `Title ], [< `Frame | `Frameset ],
            [> `Frameset ])
           plus

    val frame : src:uri ->
           ([< `Class
             | `Frameborder
             | `Id
             | `Longdesc
             | `Marginheight
             | `Marginwidth
             | `Name_01_00
             | `Noresize
             | `Scrolling
             | `Title ],
            [> `Frame ])
           nullary

    val noframes : ([< common ], [< `Body ], [> `Noframes ]) unary

## Meta

    val meta : content:cdata ->
           ([< `Http_equiv | `Name | `Scheme | `XML_lang ], [> `Meta ]) nullary

## Style Sheets

    val style : contenttype:contenttype ->
           ([< `Media | `Title | `XML_lang | `XML_space ], [< `PCDATA ], [> `Style ])
           star

## Link

    val link : ([< `Charset
             | `Class
             | `Href
             | `Hreflang
             | `Id
             | `Media
             | `Rel
             | `Rev
             | `Target
             | `Title
             | `Type
             | `XML_lang ],
            [> `Link ])
           nullary

## Base

    val base : href:uri -> unit -> [> `Base ] elt

# Output

`?encode` maps strings to HTML and must encode the unsafe characters `'<'`, `'>'`, `'"'`, `'&'` and the control characters 0-8, 11-12, 14-31, 127 to HTML entities. `XML.encode_unsafe` is the default for `?encode` in `output` and `pretty_print` below. Other implementations are provided by the module `Netencoding` in the OcamlNet library, e.g.: `let encode = Netencoding.Html.encode ~in_enc:`Enc_iso88591 ~out_enc:`Enc_usascii ()`, Where national characters are replaced by HTML entities. The user is of course free to write her own implementation.
`~encoding` is the official name of the external character set encoding that is used by `outs : string -> unit`.

    val doctype : [< `HTML_v03_02 | `HTML_v04_01 | `XHTML_01_00 | `XHTML_01_01 ] -> string

    val output : ?encode:(string -> string) ->
           ?encoding:string -> (string -> unit) -> html -> unit

    val pretty_print : ?width:int ->
           ?encode:(string -> string) ->
           ?encoding:string -> (string -> unit) -> html -> unit

# Tools

    val version : string

    val standard : uri

    val validator : uri

    val validator_icon : unit -> [> `A ] elt

A hyperlink to the W3C validator, including the logo.
See also Validator

    val addto_class : string -> 'a elt -> 'a elt

Add the element and all its subelements to a class. Note that this is only almost typesafe, because a few elements from the structure class do not support the class attribute. On the other hand, listing all allowed elements would be too tedious right now.

    val addto_class1 : string -> 'a elt -> 'a elt

Add the element to a class.

    val set_rowspan : int -> ([< `Td | `Th ] as 'a) elt -> 'a elt

Set the rowspan attribute for the element.

    val rewrite_hrefs : (string -> string) -> 'a elt -> 'a elt

    val all_hrefs : 'a elt -> uri list

    val all_anchors : 'a elt -> id list

    val tot : XML.elt -> 'a elt

    val totl : XML.elt list -> 'a elt list

    val toelt : 'a elt -> XML.elt

    val toeltl : 'a elt list -> XML.elt list