Page 35 - PortGPT_V2.1_C7_Flipbook
P. 35
Ordered List
An ordered list is also called the numbered list. This type of list is used to display the items in a
sequential manner. For example, steps in an algorithm, etc. In HTML, the <OL> tag is used to create
an ordered list.
The <LI> tag is used to define an item in the list. It can be used as an empty tag as well as a container
tag. The <OL> tag have two attributes named TYPE and START which you can use in the following
way:
• <OL TYPE ="A"> - will start the list from A.
• <OL TYPE ="a" START="4"> - will start the list from d.
• <OL TYPE ="1" START="25"> - will start the list from 25.
• <OL TYPE ="I" START="2"> - will start the list from II.
• <OL TYPE ="i" START="4"> - will start the list from iv.
The START attribute accepts only integer values.
Below table shows different examples of the TYPE attribute:
TYPE Numbering/Alphabetical Scheme Examples
A Uppercase letters A,B,C,D…..
a Lowercase letters a,b,c,d……
I Uppercase Roman numbers I, II, III, IV…
i Lowercase Roman numbers i, ii, iii, iv…
1 Numbers 1,2,3,4……..
Let us use the <OL> tag.
<HTML>
<HEAD> <TITLE> Ordered List or Numbered List </TITLE> </HEAD>
<BODY>
<B> Cup of Tea </B>
<HR>
Steps to make a cup of Tea.
<OL>
<LI> Take 3/4 cup of water and boil it in kettle.
<LI> Add a table spoon sugar.
<LI> Add 1/4 cup of milk.
<LI> Pour the tea into a cup.
<LI> Add a tea bag.
</OL>
</BODY>
</HTML>
Ordered list
Lists and Tables in HTML5 33

