Ordered Lists
An ordered list is used when you want to display items in a specific sequence, typically marked with numbers or letters. It is also known as a numbered list.
Ordered lists are great for showing steps, rankings or any content where order matters.
Syntax:
An ordered list begins with the <ol> tag (ordered list), and each list item is wrapped with the <li> tag (list item).
Example:
Output:

Customizing the Ordered List with the type Attribute
HTML lets you change the numbering format using the type attribute in the <ol> tag.
Examples of Different type Attributes
Example: Numbers (Default)
Output:

Example: Lowercase Roman Numeral
Output:

Example: Uppercase Alphabets
Output:

Example: Lowercase Alphabets
Output:

Ordered lists improve readability, especially when steps or a sequence is important. They are widely used in tutorials, instruction pages and ranking content.
Tips
Syntax:
An ordered list begins with the <ol> tag (ordered list), and each list item is wrapped with the <li> tag (list item).
<ol><li>Item One</li><li>Item Two</li><li>Item Three</li><ol>
Example:
<!DOCTYPE html><html><head><title>Ordered List</title></head><body><h3>Ordered List Example</h3><ol><li>Cat</li><li>Dog</li><li>Cow</li></ol></body></html>
Output:

Customizing the Ordered List with the type Attribute
HTML lets you change the numbering format using the type attribute in the <ol> tag.
Type Value | Description | Output Example |
---|---|---|
1 | Default numbering (1, 2, 3...) | 1, 2, 3 |
A | Uppercase letters | A, B, C |
a | Lowercase letters | a, b, c |
I | Uppercase Roman numerals | I, II, III |
i | Lowercase Roman numerals | i, ii, iii |
Examples of Different type Attributes
Example: Numbers (Default)
<ol type="1"><li>Cat</li><li>Dog</li><li>Cow</li></ol>
Output:

Example: Lowercase Roman Numeral
<ol type="i"><li>Cat</li><li>Dog</li><li>Cow</li></ol>
Output:

Example: Uppercase Alphabets
<ol type="A"><li>Cat</li><li>Dog</li><li>Cow</li></ol>
Output:

Example: Lowercase Alphabets
<ol type="a"><li>Cat</li><li>Dog</li><li>Cow</li><ol>
Output:

Ordered lists improve readability, especially when steps or a sequence is important. They are widely used in tutorials, instruction pages and ranking content.
Tips
- Ordered lists ( <ol> ) are used to display content in a specific sequence.
- Items are added using <li>
- You can customize the numbering format using the type attribute.