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

Note: This is the default type if none specified

Uppercase Letters (A, B, C)

Alphabetical numbering with uppercase letters

Note: Starts from 'A' unless start attribute is used

Lowercase Letters (a, b, c)

Alphabetical numbering with lowercase letters

Note: Starts from 'a' unless start attribute is used

Uppercase Roman (I, II, III)

Roman numeral numbering in uppercase

Note: Commonly used for outlines or book chapters

Lowercase Roman (i, ii, iii)

Roman numeral numbering in lowercase

Note: Less common but available for specific styling needs

Recipe Steps

Software Installation Guide

Academic Outline

Mixed List Nesting

Combining ordered and unordered lists

Usage: When you need both ordered and unordered sub-points

Multi-level Ordered List

Deeply nested ordered lists with different numbering

Usage: For complex outlines or legal documents

Custom Number Styling

Using CSS to style list numbers

Note: Allows for complete control over number appearance

Horizontal List

Displaying ordered list items horizontally

Note: Useful for progress indicators or step-by-step processes

Ordered List Playground

Experiment with ordered lists in our live editor

Ordered List Examples Preview

Ready-to-use examples covering different list scenarios

Live Preview

Features Included

Basic Lists
Simple numbering
Attributes
type, start, reversed
Nesting
Multi-level lists
Styling
Custom CSS examples

All examples will be loaded into an interactive editor where you can modify and test them

< PreviousNext >