- Numeric(123...).
- Capital Roman number(I, II...).
- Small Roman Number (i, ii...).
- Capital Alphabet (A, B..).
- Small Alphabet (a,b..).
<!DOCTYPE html> <html> <head> <title></title> </head> <body> <ol type="1"> <li>Youtube</li> <li>Facebook</li> <li>Twitter</li> </ol> </body> </html>
- Youtube
<!DOCTYPE html> <html> <head> <title></title> </head> <body> <ol type="I"> <li>Youtube</li> <li>Facebook</li> <li>Twitter</li> </ol> </body> </html>
Example: HTML Ordered list with type "i"
<!DOCTYPE html> <html> <head> <title></title> </head> <body> <ol type="i"> <li>Youtube</li> <li>Facebook</li> <li>Twitter</li> </ol> </body> </html>
Example: HTML Ordered list with type "A"
<!DOCTYPE html> <html> <head> <title></title> </head> <body> <ol type="A"> <li>Youtube</li> <li>Facebook</li> <li>Twitter</li> </ol> </body> </html>
Example: HTML Ordered list with type "a"
<!DOCTYPE html> <html> <head> <title></title> </head> <body> <ol type="a"> <li>Youtube</li> <li>Facebook</li> <li>Twitter</li> </ol> </body> </html>
Nested Ordered List
Example: Nested List with the same type
<!DOCTYPE html> <html> <head> <title></title> </head> <body> <ol type="1"> <li>Youtube <ol type="1"> <li>Brand Account</li> <li>Personal Account</li> </ol> </li> <li>Facebook <ol type="1"> <li>Facebook page</li> <li>facbook account</li> </ol> </li> <li>Twitter</li> </ol> </body> </html>
Example: Nested List with the different type
<!DOCTYPE html> <html> <head> <title></title> </head> <body> <ol type="1"> <li>Youtube <ol type="A"> <li>Brand Account</li> <li>Personal Account</li> </ol> </li> <li>Facebook <ol type="a"> <li>Facebook page</li> <li>facbook account</li> </ol> </li> <li>Twitter</li> </ol> </body> </html>
Start Attribute
The start attribute is used to define from where to start the list item. The start attribute is used only in the <ol> tag.
Syntax:
<ol type="value" start="value">
<!DOCTYPE html> <html> <head> <title></title> </head> <body> <ol type="1" start="3"> <li>Youtube</li> <li>Facebook</li> <li>Twitter</li> </ol> </body> </html>
Reversed Attribute
If you want to list items in reverse or descending order you can use the reverse attribute. A reversed attribute is used to list items in the reverse way or descending order.
Example: Reversed Attribute
<!DOCTYPE html> <html> <head> <title></title> </head> <body> <ol reversed="1"> <li>Youtube</li> <li>Facebook</li> <li>Twitter</li> </ol> </body> </html>
0 Comments