HTML Lists
Ordered Lists
An ordered list numbers its items. Use it when the order matters: steps, rankings or instructions.
Syntax:
<ol>
<li>Install VS Code</li>
<li>Create index.html</li>
<li>Open it in the browser</li>
</ol>Output
1. Install VS Code 2. Create index.html 3. Open it in the browser
Attributes
| Attribute | Example | Result |
|---|---|---|
type | type="A" | A, B, C (also a, I, i, 1) |
start | start="5" | Counting starts at 5 |
reversed | reversed | Counts down: 3, 2, 1 |
<ol type="I" start="4">
<li>Chapter four</li>
<li>Chapter five</li>
</ol>Output
IV. Chapter four V. Chapter five