ptg16476052
Numbered Lists 73
5
easier to read than
Dante's Divine Comedy consists of three books:
- The Inferno
- The Purgatorio
- The Paradiso
although both result in the same output in the browser.
Numbered Lists
Numbered lists are surrounded by the
- ...
each item within the list is included in the
When the browser displays an ordered list, it numbers and indents each of the elements
sequentially. You don’t have to perform the numbering yourself and, if you add or delete
items, the browser renumbers them the next time the page is loaded.
Ordered lists are lists in which each item is numbered or labeled with a counter of some
kind (like letters or roman numerals).
Use numbered lists only when the sequence of items on the list is relevant. Ordered lists
are good for steps to follow or instructions to the readers, or when you want to rank the
items in a list. If you just want to indicate that something has a number of elements that
can appear in any order, use an unordered list instead.
For example, the following is an ordered list of steps that explain how to boil an egg.
You can see how the list is displayed in a browser in Figure 5.1.
Input ▼
How to Boil an Egg
- Put eggs in a pot filled with cold water
- Bring the water to a boil
- Take the pot off the heat, cover it, and let it sit for
12 minutes - Remove the eggs from the hot water and cool them by
running water over them or placing them in a bowl of
ice water to cool off - Peel and eat