module Html: Html
type
t
include ??
val node : string -> Attribute.t list -> t list -> t
node "div" [] []
creates an empty div with no
attributes and no children.val literal : string -> t
s : string
, literal s
just considers the string s
to be
a piece of HTML. The important property is that for t : t
containing
literal s
, s
will appear verbatim in to_string t
.
This is useful for example in the following situation. Suppose you've got
a markdown post on disk that you'd like to include as an HTML page in
your site. You can do so by shelling out to a markdown compiler to convert
it to a string representing HTML, and then using that string as a t
by
using literal
.
val text : string -> t
val to_string : t -> string
val link : href:string -> t
link
element, as used for css.val hr : Attribute.t list -> t
hr
element.