How to add lists in a page?
Simple list and ordered list
Simple list
ul
[li [txt "first item"];
li [txt "second item"];
li [txt "third item"];
li [txt "fourth item"]]
Ordered list
ol
[li [txt "first item"];
li [txt "second item"]]
Required parameter: list containing li elements (Details of li content).
Optional parameter for attributes "a" (How to set and id, classes or other attributes to HTML elements?).
Definition list
dl
[((dt [txt "Banana"], []),
(dd [txt "An elongated curved fruit"], []));
((dt [txt "Orange"], []),
(dd [txt "A globose, reddish-yellow, edible fruit"],
[dd [txt "A color between yellow and red"]]));
((dt [txt "Kiwi"], []),
(dd [txt "Egg-sized green fruit from China"], []))]
This kind of list contains definitions.
Required parameter: A list of pair of:
- A pair containing:
- The first element of type dt
- A list of elements of type dt
- Another pair containing:
- The first element of type dd
- A list of elements of type dd
Details:
Optional parameter for attributes "a" (How to set and id, classes or other attributes to HTML elements?).
Download full code
Warning: This third party code may be outdated. Please notify the author is something is broken, or do a pull request on github.
Links
- Modules Eliom_content.Html.D and Eliom_content.Html.F (HTML5 Elements)
- signature Html_sigs.T (Element attributes)