Skip to main content

The PreTeXt Guide

Subsection 4.11.1 Ordered, Unordered, Description Lists

An ordered list has items with markers that are naturally ordered (usually numerically or alphabetically). We borrow from HTML, and use the <ol> tag to construct an ordered list. Some commentators suggest an ordered list should only be used when the order of the content is important. So the steps in a recipe would belong in an ordered list, but the shopping list when you go to the store need not be an ordered list.
An unordered list has items with markers that have no inherent order and so are usually symbols like circles, disks, squares, etc. We borrow from HTML, and use the <ul> tag to construct an unordered list.
A description list has items that have short pieces of text as their markers. We borrow from HTML, and use the <dl> tag to construct a description list.
Ordered lists are used as part of <objectives> ([provisional cross-reference: topic-objectives]) and exercises (Section 4.13). Any of the three lists may occur inside the <list> element (below, Section 4.20). Otherwise, a list must occur within a paragraph, <p>. This means that to place a list within a list item of another list, the list item must contain a paragraph.