Lists may be nested to represent hierarchical relationships, as in an outline format. Figure J.9 demonstrates nested lists and ordered lists (i.e., list that order items by letter or number).
Figure J.9. Nested and ordered lists in XHTML.
(This item is displayed on pages 1341 - 1343 in the print version)
"http://www.w3.org/1999/xhtml"> 9 10
1 "1.0"?> 2 "-//W3C//DTD XHTML 1.1//EN" 3 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 4 5 6 7 8
|Advanced lists 11 12 13||14 15
The Best Features of the Internet16 17 18
The first ordered list begins in line 33. Attribute type specifies the sequence type (i.e., the set of numbers or letters used in the ordered list). In this case, setting type to "I" specifies upper-case roman numerals. Line 47 begins the second ordered list and sets attribute type to "a", specifying lowercase letters for the list items. The last ordered list (lines 7175) does not use attribute type. By default, the list's items are enumerated from one to three.
A Web browser indents each nested list to indicate a hierarchal relationship. By default, the items in the outermost unordered list (line 18) are preceded by discs. List items nested inside the unordered list of line 18 are preceded by circles. Although not demonstrated in this example, subsequent nested list items are preceded by squares. Unordered list items can be explicitly set to discs, circles or squares by setting the ul element's type attribute to "disc", "circle" or "square", respectively.