Ordered List An ordered list is also a list of items. The list items are marked with numbers not with the bullets. |
||||||
An ordered list starts with the <ol> tag and end with </ol>. list items are defined in between <ol> & </ol>. Each list item is surrounded by the <li> & </li> tag. | ||||||
<ol> tag is used for ordered list. Between <ol> & </ol> you have to enter list of items. | ||||||
<li> tag is used for list item. Each list item is surrounded by <li> & </li> tag. | ||||||
Format: | ||||||
<ol> <li> item1 </li> <li> item2 </li> …….<li> itemn </li></ol> | ||||||
|
||||||
Just write/copy this example inside the body of the HTML file and save the file and open in the browser and see how it looks. | ||||||
So now you have learned how to create the ordered list in the web page. More over if you are looking for more options then you can have list containing Roman numbers, alphabets in the list instead of numbers (1,2,3…n). Ordered list have an attribute called type=”value”. | ||||||
And you know how to define the attribute of any element inside it. type attribute have different values. | ||||||
Format: | ||||||
<ol type=”value”> <li> item1 </li> <li> item2 </li> …….<li> itemn </li></ol> | ||||||
|
||||||
Tags HTML Lists Ordered List in html
Check Also
Attributes
Attributes Tags Attribute Value Description <table> align left,center,right Aligns the table. Deprecated. Use styles …