Warning: Reason support is experimental. We are looking for beta-tester and contributors.

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