DAISY—Structure Guidelines: Elements, Block Elements, Information Object Lists
A list is a sequence of two or more items. For markup purposes, there are three types of lists:
- Ordered lists (type=“ol”)—where list items are numbered or lettered. Such lists are most often used for procedures (e.g., a recipe) or sequential lists (e.g., an agenda).
- Unordered lists (type=“ul”)—where list items are un-numbered and usually marked with a bullet or other typographical device.
- Pre-formatted lists (type=“pl”)—where no enumeration or bullets are added by the display agent. Bullets or visuals of the producer’s choice may be added to the list items.
In addition, lists can also be classified as:
- Definition lists—List items generally consist of term followed by its definition
- Nested lists—a list item can also contain another list within it, which may in turn hold another list inside it, and so forth. Such a series of lists is said to be nested.
Ordered and unordered lists are created using <list> tags. When a list contains a heading, the heading should be included in the list and marked with the <hd> tag. Individual list items in unordered or ordered lists are indicated with the <li> tag. If list items consist of two or more discrete segments that should be distinguished, those segments should be marked with the <lic> (“list item component”) tag. A common example of the use of <lic> is in a table of contents to separately mark each entry and its corresponding page number. The <lic> tag should only be used when there are two or more segments in each list item. However, when there are more than two segments to each list item, consider using the <table> tag instead. See Tables: Information Object: Tables If the information presented contains nesting, this is generally an indication that it should be marked as a list rather than a table.
Definition lists are created using <dl> tags. In addition, definition lists require the <dt> tag to indicate the term being defined, and the <dd> tag to mark the definition.
The “type” attribute in <list> is required.
Pre-formatted lists—<list type=”pl”> No numbering nor bullets are added for display purposes.
Values for the “enum” attribute in <list> for ordered lists have changed:
enum=’i’: lowercase Roman
enum=’I’: uppercase Roman
The “bullet” attribute of <list> has been removed.
The “start” attribute of <list> indicates the first numeric starting point for the list. The default value is 1. A start value is useful when a list is closed, other elements are presented and then the list is reopened.
Example 1: Ordered list
<list type="ol" enum="1" class="steps">
<li>cut fruit in bite sized pieces.</li>
<li>sprinkle fruit with sugar and lime juice to taste.</li>
<li>chill for one hour.</li>
Example 2: Unordered list
<list type="ul" class="ingredients">
Example 3: Nested pre-formatted lists, showing use of <hd> tag
<li>well-known tropical fruit
<li>* pineapple </li>
<li>exotic tropical fruit
<li>* rambutan </li>
Example 4: Definition List
<dd>tropical fruit with sweet golden flesh</dd>
<dd>tropical fruit with deep red leathery skin and clear white flesh</dd>
<dd>star shaped tropical fruit with tart lemon-pineapple flavour</dd>
<dd>egg-shaped tropical fruit similar to lychees with leathery skin covered in soft red hairs</dd>
See Major Structural Elements: Information Object: Table of Contents for an example of nested list markup using the <lic> tag.DAISY