Module Htmlg.El
Elements.
Elements
val v : name -> ?a:Att.t list -> child list -> childv n ~a csis an element with namen, attributesa(defaults to[]) and childrencs. It is illegal to specify an attribute name more than once inaexcept forAtt.class'which is treated specially: multiple specifications are gathered to form a single space seperated attribute value for the class attribute.
val txt : string -> childtxt dis character datad.
val raw : string -> childraw sis the raw stringswithout escaping markup delimiters. This can be used to include foreign markup.
Output
val buffer_add : doc_type:bool -> Stdlib.Buffer.t -> child -> unitbuffer_add ~doc_type b cadds childc(or children ifcis asplice) tob. Ifdoc_typeistruean HTML doctype declaration is prepended.
val to_string : doc_type:bool -> child -> stringto_stringis likebuffer_addbut returns directly a string.
Predefined element constructors
Convention. Whenever an element name conflicts with an OCaml keyword we prime it, see for example object'.
type cons= ?a:Att.t list -> child list -> childThe type for element constructors. This is simply
vwith a pre-applied element name.
type void_cons= a:Att.t list -> childThe type for void element constructors. This is simply
elwith a pre-applied element name and without children.
val blockquote : cons
val figcaption : cons