HTML Ordered Lists Guide
Learn how to create and style ordered lists in HTML
What are Ordered Lists?
Ordered lists (<ol>
) in HTML are used to present items in a specific sequence where the order matters. Each item in the list is automatically numbered by the browser, making them ideal for:
- Step-by-step instructions or recipes
- Sequential processes or workflows
- Ranked items or prioritized tasks
- Academic outlines or legal documents
- Any content where numerical order is important
Key Features:
- Automatic numbering that adjusts when items are added/removed
- Multiple numbering styles (numbers, letters, Roman numerals)
- Customizable starting numbers
- Ability to nest lists within lists
- Full CSS styling capabilities
Basic Ordered List
Simple numbered list with default styling
<ol>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ol>
Usage: For sequential information where order matters
List with Custom Start
List starting from a specific number
<ol start="5">
<li>Item 5</li>
<li>Item 6</li>
<li>Item 7</li>
</ol>
Usage: When continuing a list from a previous point
Reversed List
List numbered in descending order
<ol reversed>
<li>Third item</li>
<li>Second item</li>
<li>First item</li>
</ol>
Usage: For countdowns or reverse-chronological order
List with Value Attributes
Manually setting item numbers
<ol>
<li value="10">Item 10</li>
<li>Item 11</li>
<li value="20">Item 20</li>
<li>Item 21</li>
</ol>
Usage: For non-sequential or special numbering
Number Type (1, 2, 3)
Default decimal numbering
Uppercase Letters (A, B, C)
Alphabetical numbering with uppercase letters
Lowercase Letters (a, b, c)
Alphabetical numbering with lowercase letters
Uppercase Roman (I, II, III)
Roman numeral numbering in uppercase
Lowercase Roman (i, ii, iii)
Roman numeral numbering in lowercase
Recipe Steps
Software Installation Guide
Academic Outline
Mixed List Nesting
Combining ordered and unordered lists
Multi-level Ordered List
Deeply nested ordered lists with different numbering
Custom Number Styling
Using CSS to style list numbers
Horizontal List
Displaying ordered list items horizontally
Ordered List Playground
Experiment with ordered lists in our live editor
Ordered List Examples Preview
Ready-to-use examples covering different list scenarios
Features Included
All examples will be loaded into an interactive editor where you can modify and test them