List
Today we are going to talk about the List. Question arises what is List ? A list is a collection of items. There are five types of list in HTML They are defined below
Ordered List
If you want to display items in a numbered list like 1,2,3,... or A,B,C... or i,ii,iii.... or I,II,III... or a,b,c....... Ordered List starts with the <ol> tag and ends with the </ol> tag. Each item starts with the <LI> tag. It is also called the Numbered List.
Tags of Ordered List
Tags of Ordered List
- <ol></ol>
- <li></li>
Attributes of Ordered List
Attributes
|
Value
|
Description
|
Type
|
“1” or “I” or
“I” or “a” or ”A”
|
|
Start
|
Value
|
To specify the starting point of the numbering.
|
Example
<html>
<head>
<title>
ordered list
</title>
</head>
<body>
<ol>
<li>pen</li>
<li>pencil</li>
<li>book</li>
</ol>
</body>
</html>
Ordered List with Type attribute
Example
<html>
<head>
<title>
ordered list
</title>
</head>
<body>
<ol type="a">
<li>pen</li>
<li>pencil</li>
<li>book</li.>
</ol>
</body>
</html>
<html>
<head>
<title>
ordered list
</title>
</head>
<body>
<ol type="a" start="4">
<li>pen</li>
<li>pencil</li>
<li>book</li.>
</ol>
</body>
</html>
<html>
<head>
<title>
ordered list
</title>
</head>
<body>
<ol>
<li>pen</li>
<li>pencil</li>
<li>book</li>
</ol>
</body>
</html>
Ordered List with Type attribute
Example
<html>
<head>
<title>
ordered list
</title>
</head>
<body>
<ol type="a">
<li>pen</li>
<li>pencil</li>
<li>book</li.>
</ol>
</body>
</html>
Ordered List with Type and Start attribute
Example<html>
<head>
<title>
ordered list
</title>
</head>
<body>
<ol type="a" start="4">
<li>pen</li>
<li>pencil</li>
<li>book</li.>
</ol>
</body>
</html>
Comments
Post a Comment