Up

module Html

: sig
#
type element = 'a Xml.frag constraint 'a = element

A (X)HTML tree.

#
type t = element list

A sequence of (X)HTML trees.

#
val doctype : string
#
val to_string : t -> string

to_string html is a valid (X)HTML5 polyglot string corresponding to the html structure.

#
val of_string : ?enc:Xml.encoding -> string -> t

of_string ?enc html_str is the tree representation of html_str as decoded by enc. For more information about the default encoding, see Xmlm.inenc.

Note that this function converts all standard entities into their corresponding UTF-8 symbol.

#
val output : ?nl:bool -> ?indent:int option -> ?ns_prefix:(string -> string option) -> Xmlm.dest -> t -> unit

Outputs valid (X)HTML5 polyglot text from a t. Only non-void element handling is implemented so far. For more information about the parameters, see Xmlm.make_output.

See also http://www.w3.org/TR/html-polyglot/ Polyglot Markup
#
val output_doc : ?nl:bool -> ?indent:int option -> ?ns_prefix:(string -> string option) -> Xmlm.dest -> t -> unit

Outputs a valid (X)HTML5 polyglot document from a t. Only non-void element handling and HTML5 DOCTYPE is implemented so far. For more information about the parameters, see Xmlm.make_output.

See also http://www.w3.org/TR/html-polyglot/ Polyglot Markup

HTML library

#
val a : ?hreflang:string -> ?rel:[
| `alternate
| `author
| `bookmark
| `help
| `license
| `next
| `nofollow
| `noreferrer
| `prefetch
| `prev
| `search
| `tag
] -> ?target:[
| `blank
| `parent
| `self
| `top
| `Frame of string
] -> ?ty:string -> ?title:string -> ?cls:string -> href:Uri.t -> t -> element

a href html generate a link from html to href.

title specifies extra information about the element that is usually as a tooltip text when the mouse moves over the element. Default: None.
Pram target Specifies where to open the linked document.
rel Specifies the relationship between the current document and the linked document. Default: None.
hreflang the language of the linked document. Default: None.
ty Specifies the media type of the linked document.
#
val img : ?alt:string -> ?width:int -> ?height:int -> ?ismap:Uri.t -> ?title:string -> ?cls:string -> Uri.t -> element
#
val interleave : string array -> t list -> t list
#
val html_of_string : string -> t
#
val html_of_int : int -> t
#
val html_of_float : float -> t
#
type table = t array array
#
val html_of_table : ?headings:bool -> table -> t
#
val nil : t
end