Nesting Lists
Sometimes it's very helpful to have nested lists when using both unordered and ordered lists. A nested list is a list within a list. To create a correctly nested list in XHTML, the trick is to be sure the nest is contained completely within an open and closing list item element (see Example 2-6).
Example 2-6. Nesting an Ordered List Within Another Ordered List
<ol><li>Beat eggs, flour, butter and sugar until creamy</li><li>Pour into round baking pan</li><li>Slowly add and swirl the following ingredients in order: <ol> <li>Add the chocolate sauce, </li> <li>Now, add the cinnamon crunchies, </li> <li>Add 1 tsp nutmeg</li> </ol></li><li>Place in oven and bake for 40 minutes</li></ol>
Figure 2-6 displays the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access