How to add lists in a page?

Simple list and ordered list

Simple list
ul
    [li [pcdata "first item"];
     li [pcdata "second item"];
     li [pcdata "third item"];
     li [pcdata "fourth item"]]
Ordered list
ol
    [li [pcdata "first item"];
     li [pcdata "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 [pcdata "Banana"], []),
      (dd [pcdata "An elongated curved fruit"], []));
     ((dt [pcdata "Orange"], []),
      (dd [pcdata "A globose, reddish-yellow, edible fruit"],
       [dd [pcdata "A color between yellow and red"]]));
     ((dt [pcdata "Kiwi"], []),
      (dd [pcdata "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