HTML Ordered Lists
An Ordered List (<ol>) defines a list of items where the sequence matters. The browser handles the numbering automatically, ensuring continuity even if you add or remove items.
Basic Syntax
The parent tag is <ol>. Inside, each item must be wrapped in a <li> (List Item) tag.
The Type Attribute
You can control the counter style using the type attribute:
type="1": Default numbers (1, 2, 3)type="A": Uppercase letters (A, B, C)type="a": Lowercase letters (a, b, c)type="I": Uppercase Roman (I, II, III)type="i": Lowercase Roman (i, ii, iii)
Start & Reversed
Use start="n" to begin counting from a specific number. Use reversed to count backwards.
View Full Transcript+
This section contains the detailed breakdown of the ordered list element. It covers the semantic difference between UL and OL, how to nest lists correctly to create outlines, and the accessibility benefits of using proper list tags over manual numbering.
