Ordered Lists
An ordered list is a list of items that must be followed in a specific order, such as in a recipe or directions to someone's home. Ordered lists are also called numbered lists.
Two elements are required to create an ordered list. The first is the <ol>. . . </ol> (ordered list) element, and the second is the <li> . . . </li> (list item) element (see Example 2-4).
Example 2-4. Creating an ordered list
<ol><li>Take I-10 to the Speedway Exit</li><li>After you've exited, make a left onto Speedway Boulevard</li><li>Follow Speedway for several miles until you reach Park Avenue. </li></ol>
The ordered list element alerts the browser that any list items contained within the list will be numbered sequentially by the browser (see
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