Definition:
If you have a list of items and want to display them in order using numbers, letters, or Roman numerals, then you can use the <ol> element.
It keeps list items inside the <li> element and supports attributes like type, start, and reversed.
Syntax:
<ol> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> </ol>
Attributes:
- type → Numbering style (1, A, a, I)
- start → Starting number
- reversed → Reverse order list
Example:
<ol type="1" start="1"> <li>PHP</li> <li>HTML</li> <li>CSS</li> </ol>
Output:
1. PHP
2. HTML
3. CSS
2. HTML
3. CSS
