Skip to main content

Section 3.8 Lists

Ordered lists (numbered), unordered lists (bullets) and description lists (defined terms) are all supported, and syntax generally follows HTML. Lists usually live within a paragraph (<p>), though there are limited exceptions. Their structure is given by the <ol>, <ul>, <dl> tags (respectively). These can specify a variety of options for the labels via attributes, as described in Section 4.11.

List items, for any of the three types, are delimited with the <li> tag. What is different from HTML is that the contents of a list item may be structured, with paragraphs (<p>) being the most likely and frequent element. So to nest lists you begin a paragraph in a list item of the outer list, then begin the inner list within that paragraph. However, a simple list item may be authored just like you were authoring within a paragraph, much like writing sentences elsewhere. A structured list item may begin with <title> for ordered and unordered lists, and is mandatory for a description list. In this latter case, the text of the <title> will become the text that is being described (the label of the list item). For the optional uses, the title will be rendered as its own paragraph, with a different font (perhaps italics or oblique). A description list cannot be contained within another list. In other words, it is a “top-level” list.

Lists are more complicated than they appear, so be sure to read the details at Section 4.11 before you start designing really involved lists.