Module Tyxml_htmlSource
Typesafe constructors and printers for Html documents.
Concrete implementation of Html typesafe constructors. See Html_sigs.T.
include Html_sigs.Make(Tyxml_xml)(Tyxml_svg).T
with module Xml.W = Xml_wrap.NoWrap
HTML elements.
Element constructors are in section elements. Most elements constructors are either nullary, unary or star, depending on the number of children they accept. Children are usually given as a list of elements. txt is used for text.
div [a [txt "Foo"]] is equivalent to <div><a>foo</a></div>
The type variable 'a is used to track the element's type. This allows the OCaml typechecker to check HTML validity.
For example, div [] is of type [> `Div] elt. The span function only accepts children of type Html_types.span_content. Since `Div is not part of it. span [div []] will not typecheck.
Note that the concrete implementation of this type can vary. See Xml for details.
A complete HTML document.
HTML attributes
Attribute constructors are in section attributes and their name starts with a_. Attributes are given to elements with the ~a optional argument.
a ~a:[a_href "ocsigen.org"] [txt "link!"] is equivalent to <a href="ocsigen.org">link!</a>
Similarly to elt, attributes use the OCaml type system to enforce HTML validity.
For example a_href returns a value of type [> `Href] attrib. The div function only accepts attributes of type Html_types.div_attrib. Since `Href is not part of it, div ~a:[a_href "ocsigen.org"] [] will not typecheck.
In some cases, attributes have to be disambiguated. The max attribute has two version, a_max and a_input_max, depending on the element. Such disambiguated attribute will contain the name of the associated element.
module Xml :
Xml_sigs.T
with type 'a W.t = 'a Tyxml_xml.W.t
with type 'a W.tlist = 'a Tyxml_xml.W.tlist
with type ('a, 'b) W.ft = ('a, 'b) Tyxml_xml.W.ft
with type uri = Tyxml_xml.uri
with type event_handler = Tyxml_xml.event_handler
with type mouse_event_handler = Tyxml_xml.mouse_event_handler
with type keyboard_event_handler = Tyxml_xml.keyboard_event_handler
with type touch_event_handler = Tyxml_xml.touch_event_handler
with type attrib = Tyxml_xml.attrib
with type elt = Tyxml_xml.elt
with module W = Xml_wrap.NoWrapUnderlying XML data-structure
wrap is a container for elements and values.
In most cases, 'a wrap = 'a. For R modules (in eliom or js_of_ocaml), It will be React.S.t.
list_wrap is a container for list of elements.
In most cases, 'a list_wrap = 'a list. For R modules (in eliom or js_of_ocaml), It will be ReactiveData.RList.t.
A nullary element is an element that doesn't have any children.
type ('a, 'b, 'c) unary =
?a:'a Tyxml_html.attrib list ->
'b Tyxml_html.elt Tyxml_html.wrap ->
'c Tyxml_html.eltA unary element is an element that have exactly one children.
type ('a, 'b, 'c) star =
?a:'a Tyxml_html.attrib list ->
'b Tyxml_html.elt Tyxml_html.list_wrap ->
'c Tyxml_html.eltA star element is an element that has any number of children, including zero.
module Info : Xml_sigs.InfoVarious information about HTML, such as the doctype, ...
Uri
Attributes
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_user_data :
Html_types.nmtoken ->
Html_types.text Tyxml_html.wrap ->
[> `User_data ] Tyxml_html.attribMay be used to specify custom attributes. The example given by the W3C is as follows :
<ol> <li data-length="2m11s">Beyond The Sea</li> </ol>
It should be used for preprocessing ends only.
This attribute assigns a name to an element. This name must be unique in a document. The text should be without any space.
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
Events
Javascript events
val a_oncanplaythrough :
Tyxml_html.Xml.event_handler ->
[> `OnCanPlayThrough ] Tyxml_html.attribval a_ondurationchange :
Tyxml_html.Xml.event_handler ->
[> `OnDurationChange ] Tyxml_html.attribval a_onreadystatechange :
Tyxml_html.Xml.event_handler ->
[> `OnReadyStateChange ] Tyxml_html.attribval a_onloadedmetadata :
Tyxml_html.Xml.event_handler ->
[> `OnLoadedMetaData ] Tyxml_html.attribMouse events
val a_ontouchstart :
Tyxml_html.Xml.touch_event_handler ->
[> `OnTouchStart ] Tyxml_html.attribTouch events
val a_ontouchcancel :
Tyxml_html.Xml.touch_event_handler ->
[> `OnTouchCancel ] Tyxml_html.attribKeyboard events
val a_onkeypress :
Tyxml_html.Xml.keyboard_event_handler ->
[> `OnKeyPress ] Tyxml_html.attribOther attributes
val a_autocomplete :
Html_types.autocomplete_option Tyxml_html.wrap ->
[> `Autocomplete ] Tyxml_html.attribval a_crossorigin :
[< `Anonymous | `Use_credentials ] Tyxml_html.wrap ->
[> `Crossorigin ] Tyxml_html.attribval a_formenctype :
Html_types.contenttype Tyxml_html.wrap ->
[> `Formenctype ] Tyxml_html.attribval a_input_max :
Html_types.number_or_datetime Tyxml_html.wrap ->
[> `Input_Max ] Tyxml_html.attribval a_input_min :
Html_types.number_or_datetime Tyxml_html.wrap ->
[> `Input_Min ] Tyxml_html.attribval a_inputmode :
[< `None | `Text | `Decimal | `Numeric | `Tel | `Search | `Email | `Url ]
Tyxml_html.wrap ->
[> `Inputmode ] Tyxml_html.attribval a_preload :
[< `None | `Metadata | `Audio ] Tyxml_html.wrap ->
[> `Preload ] Tyxml_html.attribval a_referrerpolicy :
Html_types.referrerpolicy Tyxml_html.wrap ->
[> `Referrerpolicy ] Tyxml_html.attribval a_sandbox :
[< Html_types.sandbox_token ] list Tyxml_html.wrap ->
[> `Sandbox ] Tyxml_html.attribval a_sizes :
(Html_types.number * Html_types.number) list option Tyxml_html.wrap ->
[> `Sizes ] Tyxml_html.attribtype image_candidate = [ | `Url of Tyxml_html.uri| `Url_width of Tyxml_html.uri * Html_types.number| `Url_pixel of Tyxml_html.uri * Html_types.float_number
]val a_srcset :
Tyxml_html.image_candidate list Tyxml_html.wrap ->
[> `Srcset ] Tyxml_html.attribval a_xml_space :
[< `Default | `Preserve ] Tyxml_html.wrap ->
[> `XML_space ] Tyxml_html.attribThis 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.
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 :
Html_types.charsets Tyxml_html.wrap ->
[> `Accept_charset ] Tyxml_html.attribThis 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.
This attribute specifies the base language of the resource designated by href and may only be used when href is specified.
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.
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.
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.
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.
This attribute specifies a form processing agent. User agent behavior for a value other than an HTTP URI is undefined.
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.
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.
This attribute assigns the control name.
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.
When set, this boolean attribute specifies that this option is pre-selected.
val a_input_type :
[< `Url
| `Tel
| `Text
| `Time
| `Search
| `Password
| `Checkbox
| `Range
| `Radio
| `Submit
| `Reset
| `Number
| `Hidden
| `Month
| `Week
| `File
| `Email
| `Image
| `Datetime_local
| `Datetime
| `Date
| `Color
| `Button ]
Tyxml_html.wrap ->
[> `Input_Type ] Tyxml_html.attribThis 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.
val a_float_value :
Html_types.float_number Tyxml_html.wrap ->
[> `Float_Value ] Tyxml_html.attribval a_button_type :
[< `Button | `Submit | `Reset ] Tyxml_html.wrap ->
[> `Button_Type ] Tyxml_html.attribval a_script_type :
Html_types.script_type Tyxml_html.wrap ->
[> `Script_type ] Tyxml_html.attribval a_command_type :
[< `Command | `Checkbox | `Radio ] Tyxml_html.wrap ->
[> `Command_Type ] Tyxml_html.attribval a_align :
[< `Left | `Right | `Justify | `Char ] Tyxml_html.wrap ->
[> `Align ] Tyxml_html.attribval a_scope :
[< `Row | `Col | `Rowgroup | `Colgroup ] Tyxml_html.wrap ->
[> `Scope ] Tyxml_html.attribval a_rules :
[< `None | `Groups | `Rows | `Cols | `All ] Tyxml_html.wrap ->
[> `Rules ] Tyxml_html.attribval a_marginheight :
Html_types.pixels Tyxml_html.wrap ->
[> `Marginheight ] Tyxml_html.attribval a_scrolling :
[< `Yes | `No | `Auto ] Tyxml_html.wrap ->
[> `Scrolling ] Tyxml_html.attribARIA support
WAI-ARIA is a specification written by the W3C, defining a set of additional HTML attributes that can be applied to elements to provide additional semantics and improve accessibility wherever it is lacking.
See for example a WAI-ARIA tutorial.
Basic support for WAI-ARIA attributes: a_aria "foo" corresponds to an "aria-foo" attribute.
Elements
val html :
?a:Html_types.html_attrib Tyxml_html.attrib list ->
[< Html_types.head ] Tyxml_html.elt Tyxml_html.wrap ->
[< Html_types.body ] Tyxml_html.elt Tyxml_html.wrap ->
[> Html_types.html ] Tyxml_html.eltval head :
?a:Html_types.head_attrib Tyxml_html.attrib list ->
[< Html_types.title ] Tyxml_html.elt Tyxml_html.wrap ->
Html_types.head_content_fun Tyxml_html.elt Tyxml_html.list_wrap ->
[> Html_types.head ] Tyxml_html.eltval title :
(Html_types.title_attrib,
[< Html_types.title_content_fun ],
[> Html_types.title ])
Tyxml_html.unaryval body :
([< Html_types.body_attrib ],
[< Html_types.body_content_fun ],
[> Html_types.body ])
Tyxml_html.starval svg :
?a:[< Html_types.svg_attrib ] Tyxml_svg.attrib list ->
[< Html_types.svg_content ] Tyxml_svg.elt Tyxml_html.list_wrap ->
[> Html_types.svg ] Tyxml_html.eltSection
val header :
([< Html_types.header_attrib ],
[< Html_types.header_content_fun ],
[> Html_types.header ])
Tyxml_html.starval section :
([< Html_types.section_attrib ],
[< Html_types.section_content_fun ],
[> Html_types.section ])
Tyxml_html.starval h1 :
([< Html_types.h1_attrib ],
[< Html_types.h1_content_fun ],
[> Html_types.h1 ])
Tyxml_html.starval h2 :
([< Html_types.h2_attrib ],
[< Html_types.h2_content_fun ],
[> Html_types.h2 ])
Tyxml_html.starval h3 :
([< Html_types.h3_attrib ],
[< Html_types.h3_content_fun ],
[> Html_types.h3 ])
Tyxml_html.starval h4 :
([< Html_types.h4_attrib ],
[< Html_types.h4_content_fun ],
[> Html_types.h4 ])
Tyxml_html.starval h5 :
([< Html_types.h5_attrib ],
[< Html_types.h5_content_fun ],
[> Html_types.h5 ])
Tyxml_html.starval h6 :
([< Html_types.h6_attrib ],
[< Html_types.h6_content_fun ],
[> Html_types.h6 ])
Tyxml_html.starval hgroup :
([< Html_types.hgroup_attrib ],
[< Html_types.hgroup_content_fun ],
[> Html_types.hgroup ])
Tyxml_html.starval address :
([< Html_types.address_attrib ],
[< Html_types.address_content_fun ],
[> Html_types.address ])
Tyxml_html.starval article :
([< Html_types.article_attrib ],
[< Html_types.article_content_fun ],
[> Html_types.article ])
Tyxml_html.starval aside :
([< Html_types.aside_attrib ],
[< Html_types.aside_content_fun ],
[> Html_types.aside ])
Tyxml_html.starval main :
([< Html_types.main_attrib ],
[< Html_types.main_content_fun ],
[> Html_types.main ])
Tyxml_html.starGrouping content
val p :
([< Html_types.p_attrib ], [< Html_types.p_content_fun ], [> Html_types.p ])
Tyxml_html.starval pre :
([< Html_types.pre_attrib ],
[< Html_types.pre_content_fun ],
[> Html_types.pre ])
Tyxml_html.starval blockquote :
([< Html_types.blockquote_attrib ],
[< Html_types.blockquote_content_fun ],
[> Html_types.blockquote ])
Tyxml_html.starval dialog :
([< Html_types.dialog_attrib ],
[< Html_types.dialog_content_fun ],
[> Html_types.dialog ])
Tyxml_html.starval div :
([< Html_types.div_attrib ],
[< Html_types.div_content_fun ],
[> Html_types.div ])
Tyxml_html.starval dl :
([< Html_types.dl_attrib ],
[< Html_types.dl_content_fun ],
[> Html_types.dl ])
Tyxml_html.starval ol :
([< Html_types.ol_attrib ],
[< Html_types.ol_content_fun ],
[> Html_types.ol ])
Tyxml_html.starval ul :
([< Html_types.ul_attrib ],
[< Html_types.ul_content_fun ],
[> Html_types.ul ])
Tyxml_html.starval dd :
([< Html_types.dd_attrib ],
[< Html_types.dd_content_fun ],
[> Html_types.dd ])
Tyxml_html.starval dt :
([< Html_types.dt_attrib ],
[< Html_types.dt_content_fun ],
[> Html_types.dt ])
Tyxml_html.starval li :
([< Html_types.li_attrib ],
[< Html_types.li_content_fun ],
[> Html_types.li ])
Tyxml_html.starval figcaption :
([< Html_types.figcaption_attrib ],
[< Html_types.figcaption_content_fun ],
[> Html_types.figcaption ])
Tyxml_html.starval figure :
?figcaption:
[ `Top of [< Html_types.figcaption ] Tyxml_html.elt Tyxml_html.wrap
| `Bottom of [< Html_types.figcaption ] Tyxml_html.elt Tyxml_html.wrap ] ->
([< Html_types.figure_attrib ],
[< Html_types.figure_content_fun ],
[> Html_types.figure ])
Tyxml_html.starSemantic
val b :
([< Html_types.b_attrib ], [< Html_types.b_content_fun ], [> Html_types.b ])
Tyxml_html.starval i :
([< Html_types.i_attrib ], [< Html_types.i_content_fun ], [> Html_types.i ])
Tyxml_html.starval u :
([< Html_types.u_attrib ], [< Html_types.u_content_fun ], [> Html_types.u ])
Tyxml_html.starval small :
([< Html_types.small_attrib ],
[< Html_types.small_content_fun ],
[> Html_types.small ])
Tyxml_html.starval sub :
([< Html_types.sub_attrib ],
[< Html_types.sub_content_fun ],
[> Html_types.sub ])
Tyxml_html.starval sup :
([< Html_types.sup_attrib ],
[< Html_types.sup_content_fun ],
[> Html_types.sup ])
Tyxml_html.starval mark :
([< Html_types.mark_attrib ],
[< Html_types.mark_content_fun ],
[> Html_types.mark ])
Tyxml_html.starval bdo :
dir:[< `Ltr | `Rtl ] Tyxml_html.wrap ->
([< Html_types.bdo_attrib ],
[< Html_types.bdo_content_fun ],
[> Html_types.bdo ])
Tyxml_html.starval abbr :
([< Html_types.abbr_attrib ],
[< Html_types.abbr_content_fun ],
[> Html_types.abbr ])
Tyxml_html.starval cite :
([< Html_types.cite_attrib ],
[< Html_types.cite_content_fun ],
[> Html_types.cite ])
Tyxml_html.starval code :
([< Html_types.code_attrib ],
[< Html_types.code_content_fun ],
[> Html_types.code ])
Tyxml_html.starval dfn :
([< Html_types.dfn_attrib ],
[< Html_types.dfn_content_fun ],
[> Html_types.dfn ])
Tyxml_html.starval em :
([< Html_types.em_attrib ],
[< Html_types.em_content_fun ],
[> Html_types.em ])
Tyxml_html.starval kbd :
([< Html_types.kbd_attrib ],
[< Html_types.kbd_content_fun ],
[> Html_types.kbd ])
Tyxml_html.starval q :
([< Html_types.q_attrib ], [< Html_types.q_content_fun ], [> Html_types.q ])
Tyxml_html.starval samp :
([< Html_types.samp_attrib ],
[< Html_types.samp_content_fun ],
[> Html_types.samp ])
Tyxml_html.starval span :
([< Html_types.span_attrib ],
[< Html_types.span_content_fun ],
[> Html_types.span ])
Tyxml_html.starval strong :
([< Html_types.strong_attrib ],
[< Html_types.strong_content_fun ],
[> Html_types.strong ])
Tyxml_html.starval time :
([< Html_types.time_attrib ],
[< Html_types.time_content_fun ],
[> Html_types.time ])
Tyxml_html.starval var :
([< Html_types.var_attrib ],
[< Html_types.var_content_fun ],
[> Html_types.var ])
Tyxml_html.starHypertext
Edit
Embedded
val img :
src:Tyxml_html.Xml.uri Tyxml_html.wrap ->
alt:Html_types.text Tyxml_html.wrap ->
([< Html_types.img_attrib ], [> Html_types.img ]) Tyxml_html.nullaryval picture :
img:[< Html_types.img ] Tyxml_html.elt Tyxml_html.wrap ->
([< Html_types.picture_attrib ],
[< Html_types.picture_content_fun ],
[> Html_types.picture ])
Tyxml_html.starval iframe :
([< Html_types.iframe_attrib ],
[< Html_types.iframe_content_fun ],
[> Html_types.iframe ])
Tyxml_html.starval object_ :
?params:[< Html_types.param ] Tyxml_html.elt Tyxml_html.list_wrap ->
([< Html_types.object__attrib ], 'a, [> `Object of 'a ]) Tyxml_html.starval audio :
?src:Tyxml_html.Xml.uri Tyxml_html.wrap ->
?srcs:[< Html_types.source ] Tyxml_html.elt Tyxml_html.list_wrap ->
([< Html_types.audio_attrib ], 'a, [> 'a Html_types.audio ]) Tyxml_html.starval video :
?src:Tyxml_html.Xml.uri Tyxml_html.wrap ->
?srcs:[< Html_types.source ] Tyxml_html.elt Tyxml_html.list_wrap ->
([< Html_types.video_attrib ], 'a, [> 'a Html_types.video ]) Tyxml_html.starval area :
alt:Html_types.text Tyxml_html.wrap ->
([< Html_types.common
| `Alt
| `Coords
| `Shape
| `Target
| `Rel
| `Media
| `Hreflang
| `Mime_type ],
[> Html_types.area ])
Tyxml_html.nullaryTables Data
val caption :
([< Html_types.caption_attrib ],
[< Html_types.caption_content_fun ],
[> Html_types.caption ])
Tyxml_html.starval table :
?caption:[< Html_types.caption ] Tyxml_html.elt Tyxml_html.wrap ->
?columns:[< Html_types.colgroup ] Tyxml_html.elt Tyxml_html.list_wrap ->
?thead:[< Html_types.thead ] Tyxml_html.elt Tyxml_html.wrap ->
?tfoot:[< Html_types.tfoot ] Tyxml_html.elt Tyxml_html.wrap ->
([< Html_types.table_attrib ],
[< Html_types.table_content_fun ],
[> Html_types.table ])
Tyxml_html.starval tablex :
?caption:[< Html_types.caption ] Tyxml_html.elt Tyxml_html.wrap ->
?columns:[< Html_types.colgroup ] Tyxml_html.elt Tyxml_html.list_wrap ->
?thead:[< Html_types.thead ] Tyxml_html.elt Tyxml_html.wrap ->
?tfoot:[< Html_types.tfoot ] Tyxml_html.elt Tyxml_html.wrap ->
([< Html_types.tablex_attrib ],
[< Html_types.tablex_content_fun ],
[> Html_types.tablex ])
Tyxml_html.starval colgroup :
([< Html_types.colgroup_attrib ],
[< Html_types.colgroup_content_fun ],
[> Html_types.colgroup ])
Tyxml_html.starval thead :
([< Html_types.thead_attrib ],
[< Html_types.thead_content_fun ],
[> Html_types.thead ])
Tyxml_html.starval tbody :
([< Html_types.tbody_attrib ],
[< Html_types.tbody_content_fun ],
[> Html_types.tbody ])
Tyxml_html.starval tfoot :
([< Html_types.tfoot_attrib ],
[< Html_types.tfoot_content_fun ],
[> Html_types.tfoot ])
Tyxml_html.starval td :
([< Html_types.td_attrib ],
[< Html_types.td_content_fun ],
[> Html_types.td ])
Tyxml_html.starval th :
([< Html_types.th_attrib ],
[< Html_types.th_content_fun ],
[> Html_types.th ])
Tyxml_html.starval tr :
([< Html_types.tr_attrib ],
[< Html_types.tr_content_fun ],
[> Html_types.tr ])
Tyxml_html.starForms
val form :
([< Html_types.form_attrib ],
[< Html_types.form_content_fun ],
[> Html_types.form ])
Tyxml_html.starval fieldset :
?legend:[< Html_types.legend ] Tyxml_html.elt Tyxml_html.wrap ->
([< Html_types.fieldset_attrib ],
[< Html_types.fieldset_content_fun ],
[> Html_types.fieldset ])
Tyxml_html.starval legend :
([< Html_types.legend_attrib ],
[< Html_types.legend_content_fun ],
[> Html_types.legend ])
Tyxml_html.starval label :
([< Html_types.label_attrib ],
[< Html_types.label_content_fun ],
[> Html_types.label ])
Tyxml_html.starLabel authorizes only one control inside them that should be labelled with a for attribute (although it is not necessary). Such constraints are not currently enforced by the type-system
val button :
([< Html_types.button_attrib ],
[< Html_types.button_content_fun ],
[> Html_types.button ])
Tyxml_html.starval select :
([< Html_types.select_attrib ],
[< Html_types.select_content_fun ],
[> Html_types.select ])
Tyxml_html.starval datalist :
?children:
[< `Options of
[< Html_types.selectoption ] Tyxml_html.elt Tyxml_html.list_wrap
| `Phras of [< Html_types.phrasing ] Tyxml_html.elt Tyxml_html.list_wrap ] ->
([< Html_types.datalist_attrib ], [> Html_types.datalist ])
Tyxml_html.nullaryval optgroup :
label:Html_types.text Tyxml_html.wrap ->
([< Html_types.optgroup_attrib ],
[< Html_types.optgroup_content_fun ],
[> Html_types.optgroup ])
Tyxml_html.starval option :
([< Html_types.option_attrib ],
[< Html_types.option_content_fun ],
[> Html_types.selectoption ])
Tyxml_html.unaryval textarea :
([< Html_types.textarea_attrib ],
[< Html_types.textarea_content_fun ],
[> Html_types.textarea ])
Tyxml_html.unaryval progress :
([< Html_types.progress_attrib ],
[< Html_types.progress_content_fun ],
[> Html_types.progress ])
Tyxml_html.starval meter :
([< Html_types.meter_attrib ],
[< Html_types.meter_content_fun ],
[> Html_types.meter ])
Tyxml_html.starval output_elt :
([< Html_types.output_elt_attrib ],
[< Html_types.output_elt_content_fun ],
[> Html_types.output_elt ])
Tyxml_html.starData
entity "foo" is the HTML entity &foo;. Both numerical and named form are allowed.
Interactive
val details :
[< Html_types.summary ] Tyxml_html.elt Tyxml_html.wrap ->
([< Html_types.details_attrib ],
[< Html_types.details_content_fun ],
[> Html_types.details ])
Tyxml_html.starval summary :
([< Html_types.summary_attrib ],
[< Html_types.summary_content_fun ],
[> Html_types.summary ])
Tyxml_html.starval command :
label:Html_types.text Tyxml_html.wrap ->
([< Html_types.command_attrib ], [> Html_types.command ]) Tyxml_html.nullaryScripting
val script :
([< Html_types.script_attrib ],
[< Html_types.script_content_fun ],
[> Html_types.script ])
Tyxml_html.unaryval noscript :
([< Html_types.noscript_attrib ],
[< Html_types.noscript_content_fun ],
[> Html_types.noscript ])
Tyxml_html.starval template :
([< Html_types.template_attrib ],
[< Html_types.template_content_fun ],
[> Html_types.template ])
Tyxml_html.starStyle Sheets
val style :
([< Html_types.style_attrib ],
[< Html_types.style_content_fun ],
[> Html_types.style ])
Tyxml_html.starval link :
rel:Html_types.linktypes Tyxml_html.wrap ->
href:Tyxml_html.Xml.uri Tyxml_html.wrap ->
([< Html_types.link_attrib ], [> Html_types.link ]) Tyxml_html.nullaryRuby
val rt :
([< Html_types.rt_attrib ],
[< Html_types.rt_content_fun ],
[> Html_types.rt ])
Tyxml_html.starval rp :
([< Html_types.rp_attrib ],
[< Html_types.rp_content_fun ],
[> Html_types.rp ])
Tyxml_html.starval ruby :
([< Html_types.ruby_attrib ],
[< Html_types.ruby_content_fun ],
[> Html_types.ruby ])
Tyxml_html.starDeprecated
Conversion with untyped representation
WARNING: These functions do not ensure HTML or SVG validity! You should always explicitly given an appropriate type to the output.
import signal converts the given XML signal into Tyxml elements. It can be used with HTML and SVG parsing libraries, such as Markup.
val toeltl :
'a Tyxml_html.elt Tyxml_html.list_wrap ->
Tyxml_html.Xml.elt Tyxml_html.list_wrapmodule Unsafe : sig ... endUnsafe features.
Printers
val pp :
?encode:(string -> string) ->
?indent:bool ->
?advert:string ->
unit ->
Stdlib.Format.formatter ->
Tyxml_html.doc ->
unitpp () is a Format printer for Html documents.
It can be used in combination with "%a". For example, to get a string:
let s = Format.asprintf "%a" (Tyxml.Html.pp ()) my_htmlval pp_elt :
?encode:(string -> string) ->
?indent:bool ->
unit ->
Stdlib.Format.formatter ->
'a Tyxml_html.elt ->
unitpp_elt () is a Format printer for Html elements.
module Make_printer
(O : Xml_sigs.Output) :
Xml_sigs.Typed_printer
with type out := O.out
and type 'a elt := 'a Tyxml_html.elt
and type doc := Tyxml_html.docParametrized stream printer for Html documents.
/
Toplevel printers