Typically, ordered list items display with a preceding
marker
, such as a number or letter.
The
<ol>
and
<ul>
(or the synonym
<menu>
) elements may nest as deeply as desired, alternating between
<ol>
,
<ul>
(or
<menu>
) as needed.
The
<ol>
and
<ul>
elements both represent a list of items. The difference is with the
<ol>
element, the order is meaningful. For example:
- Steps in a recipe
- Turn-by-turn directions
- The list of ingredients in decreasing proportion on nutrition information labels
To determine which list to use, try changing the order of the list items; if the meaning changes, use the
<ol>
element ? otherwise you can use
<ul>
otherwise, or
<menu>
if your list is a menu.