HTML <ol> tag
HTML <ol> tag : Definition
• The <ol> tag defines an ordered list. An ordered list can be numerical or alphabetical.
• The <ol> tag generally displayed in bullet points by default that can be modified using CSS.
Html <ol> tag example 1:
<!DOCTYPE html> <html> <body> <ol> <li>I'm first list</li> <li>I'm second list</li> <li>I'm third list</li> <li>I'm four list</li> <li>I'm fifth list</li> </ol> </body> </html>
Output:
The ordered list <ol> is generally displayed in an ascending number or in a letter.
- This is first list
- This is second list
- This is third list
- This is fourth list
- This is fifth list
Html <ol> tag example 2: type="I"
<!DOCTYPE html> <html> <body> <ol type="I"> <li>I'm first list</li> <li>I'm second list</li> <li>I'm third list</li> <li>I'm four list</li> <li>I'm fifth list</li> </ol> </body> </html>
Output :
- I'm first list
- I'm second list
- I'm third list
- I'm four list
- I'm fifth list
Html <ol> tag example 3: start="10"
<!DOCTYPE html> <html> <body> <ol start="10"> <li>I'm first list</li> <li>I'm second list</li> <li>I'm third list</li> <li>I'm four list</li> <li>I'm fifth list</li> </ol> </body> </html>
Output :
- I'm first list
- I'm second list
- I'm third list
- I'm four list
- I'm fifth list
Html <ol> tag example 4: reversed="5"
<!DOCTYPE html> <html> <body> <ol reversed="5"> <li>I'm first list</li> <li>I'm second list</li> <li>I'm third list</li> <li>I'm four list</li> <li>I'm fifth list</li> </ol> </body> </html>
Output :
- I'm first list
- I'm second list
- I'm third list
- I'm four list
- I'm fifth list