The <li> tag
<li> defines a single list item — inside ul, ol, or menu.
Syntax
<li>Item text</li> Attributes
| value (ol only) | Sets the number for this specific item, and shifts the numbering of subsequent items accordingly. |
Example
<ol>
<li value="10">Tenth</li>
<li>Eleventh (automatic)</li>
</ol>
Notes
- value is ignored inside ul — it only makes sense inside ol.
Related tools
The <ul> tag
Purpose of <ul>: a list of items with no meaningful order, each item an <li>.
The <ol> tag
The start, reversed, and type attributes of <ol> for numbered lists.
Mark up a recipe with lists
Practice exercise: turn a plain-text recipe into proper lists — ul, ol, a nested list inside li, ol start and a dl glossary of terms.