Skip to main content
\( \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section3.7Lists

Ordered lists (numbered), unordered lists (bullets) and description lists (defined terms) are all supported, and syntax generally follows HTML. Lists always live within a paragraph (<p>). 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 6.7. Because a paragraph has mixed-content, you want to place these list-initiating tags immediately after the character preceding it, with no intervening whitespace, and specifically not with an intervening newline.

Once inside a list, you may use as much whitespace as you choose between the list items. Typically you would indent one level, start each list item on its own line, and perhaps use blank lines between list items of a complicated list.

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. So to nest lists you begin a paragraph in a list item of the outer list, then begin the inner list within that paragraph. But a simple list item may be authored as mixed-content, much like a sentence elsewhere. For a description list, the list item should contain a <title>, which will become the text that is being described. A description list typically does not contain a nested list, nor is a description list contained within another list.