HTML Essentials
Lists
Group related items as ordered or unordered lists.
Use an unordered list when sequence does not matter and an ordered list when it does.
Important definitions
- List item
- One entry represented by li.
- Ordered list
- A numbered sequence.
Syntax
Use this general pattern as a reference:
HTML
<ul><li>Item</li></ul>Examples
Steps
EXAMPLE 1
<ol><li>Plan</li><li>Build</li></ol>ResultA numbered two-step list
COMPLETE EXAMPLE
<ul>
<li>HTML</li>
<li>CSS</li>
</ul>Expected output
A bulleted list containing HTML and CSS.
Note
Only list items should be direct children of ul and ol.
Tip
Use lists for genuine groups, not general indentation.
Common mistakes
- Placing plain text directly inside ul.
- Using manual numbers instead of ol.