HTML Basics-List tag, the ordered List, Examples using
various attributes-In my previous article I explained types of lists such as Ordered
List, unordered list and Definition or Description List and the unordered
list in details with examples. In the unordered list, disks, circles or
squares are displayed with the list items where as in the ordered the list
items are marked with numbers or alphabets. Any numbering scheme appropriate to
the language context such as Numbers(0 to 9), alphabets(Upper case or lower
case “a to z or A to Z”), roman numerals(I,II,III,IV etc.), arabic may be used.
The <OL>…</OL> tags and then the usual <li>…</li> tag
is used. An optional list header tag
<lh>…</lh> may be used.
![]() |
HTML Basics-List tag, the ordered List, Examples using various attributes |
The ordered List
Let us discuss the ordered list in detail -
Tags and attributes
used in an ordered list
<ol…</ol>
|
Opening and closing tags of the ordered list
|
<lh>…</lh>
|
To define the heading of the list(Optional ).
|
<li>…</li>
|
To define the items of the list
|
Type=”1”
|
To display the list in numerical
order(1,2,3….), this is default order
|
Type=”A”
|
To display the list in alphabetical
order(Capital alphabets or upper case as A,B,C…)
|
Type=”a”
|
To display the list in alphabetical
order(small alphabets or lower case as a,b,c…)
|
Type=”I”
|
To display the list in roman numerals(Upper
case)
|
Type=”i”
|
To display the list in roman numerals(Lower
case)
|
Example without using
any attribute or the default 1,2,3… will be used –
<ol>
<lh>Office Stationery</lh>
<li>Note Books</li>
<li>Pens</li>
<li>Pencils</li>
<li>Erasers</li>
</ol>
|
Office Stationery
1. Note Books
2. Pens
3. Pencils
4. Erasers
|
Example of ordered
list using the attribute type=”1”
<ol type=”1”>
<lh>Office Stationery</lh>
<li>Note Books</li>
<li>Pens</li>
<li>Pencils</li>
<li>Erasers</li>
</ol>
|
Office Stationery
1. Note Books
2. Pens
3. Pencils
4. Erasers
|
Note- The default order of the numbered list<ol> is 1,2,3… therefore the result of using the “type=”1” will be similar to that of without using any attribute.
Example of ordered
list using the attribute type=”A” -
<ol type=”A”>
<lh>Office Stationery</lh>
<li>Note Books</li>
<li>Pens</li>
<li>Pencils</li>
<li>Erasers</li>
</ol>
|
Office Stationery
A. Note Books
B. Pens
C. Pencils
D. Erasers
|
Example of ordered
list using the attribute type=”a” -
<ol type=”a”>
<lh>Office Stationery</lh>
<li>Note Books</li>
<li>Pens</li>
<li>Pencils</li>
<li>Erasers</li>
</ol>
|
Office Stationery
a. Note Books
b. Pens
c. Pencils
d. Erasers
|
Example of ordered
list using the attribute type=”I” -
<ol type=” I”>
<lh>Office Stationery</lh>
<li>Note Books</li>
<li>Pens</li>
<li>Pencils</li>
<li>Erasers</li>
</ol>
|
Office Stationery
I. Note Books
II. Pens
III. Pencils
IV. Erasers
|
Example of ordered
list using the attribute type=”i” -
<ol type=” i”>
<lh>Office Stationery</lh>
<li>Note Books</li>
<li>Pens</li>
<li>Pencils</li>
<li>Erasers</li>
</ol>
|
Office Stationery
i. Note Books
ii. Pens
iii. Pencils
iv. Erasers
|
Special request – Please let us know through a comment that
how our effort was. Do not hesitate to give an dverse opinion, give your
opinion impartially. Please subscribe to our blog and like our Facebook page.
Subscribe to our YouTube channel “Start with Wikigreen”. Please share it to
your friends and beloveds. Thanks a lot for visiting our page.
2 टिप्पणियाँ:
Good Article on Ordered List
बहुत उपयोगी जानकारी...
टिप्पणी पोस्ट करें