Ordered and Unordered List
Ordered and Unordered List
Examples
<ul>List of Items</ul>
Output:
Syntax:
<ol>List of Items</ol>
To mark the list items with letters A, B, C, etc., you will have to specify A as the type attribute’s value in the <ol> tag.
➢ Here is an example to show the use of Upper case le ers to list the items.
<!DOCTYPE html>
<html>
<head>
<title>HTML Ordered List</title>
</head>
<body>
<h2>List of Fruits</h2>
<ol type="A">
<li>Apple</li>
<li>Mango</li>
<li>Banana</li>
</ol>
</body>
</html>
Output:
tt
<!DOCTYPE html>
<html>
<head>
<title>HTML Description List</title>
</head>
<body>
<dl>
<dt><b>Apple</b></dt>
<dd>A red colored fruit</dd>
<dt><b>Honda</b></dt>
<dd>A brand of a car</dd>
<dt><b>Spinach</b></dt>
<dd>A green leafy vegetable</dd>
</dl>
</body>
</html>
Output:
<head>
<title>HTML Nested Ordered List</title>
</head>
<body>
<ol>
<li>Banana</li>
<li> Apple
<ol>
<li>Green Apple</li>
<li>Red Apple</li>
</ol>
</li>
<li>Pineapple</li>
<li>Orange</li>
</ol>
</body>
</html>
Output:
<li>Vegetables</li>
<ul>
<li>Spinach</li>
<li>Cauliflower</li>
<li>Beetroot</li>
</ul>
<li>Cereals</li>
<li>Nuts</li>
</ul>
</body>
</html>
Output: