HTML LIST :
HTML offers three types of lists they are :
1.Unordered list: This can be created using <ul> tag,this will list items using plain bullets.
2.Ordered list: This can be created using <ol> tag,this will use different schemes of numbers to list items.
3.Definition list: This can be created using <dl> tag,this arranges your items in the same way as they are arranged.
UNORDERED LIST :
An unordered list is a collection of items that have no special order or sequence.This list is created by using HTML<ul> tag and each list starts with <li> tag , each item in the list is marked with a bullet .
Example for Unordered List :
<html>
<head>
<title>Unordered List</title>
</head>
<body>
<ul>
<li>Anshul</li>
<li>Himanshu</li>
<li>Nitin</li>
<li>Lekhank</li>
</ul>
</body>
</html>
output:
Unordered List
</head>
<body>
<ol>
<li>Anshul</li>
<li>Himanshu</li>
<li>Nitin</li>
<li>Lekhank</li>
</ol>
</body>
</html>
Output:
- Anshul
- Himanshu
- Nitin
- Lekhank
ORDERED LIST :
An Ordered list is a list of items in a numbered list.This list is created by using <ol> tag. The numbering starts at one and is incremented by one for each successive ordered list element tagged with <li>.
Example for Ordered List :
<html>
<head>
<title>ordered List</title></head>
<body>
<ol>
<li>Anshul</li>
<li>Himanshu</li>
<li>Nitin</li>
<li>Lekhank</li>
</ol>
</body>
</html>
Output:
ordered List
- Anshul
- Himanshu
- Nitin
- Lekhank
DISCRIPTION LIST :
A description list, is a list of items, with a description of each item.
1. The <dl> tag defines a list.
2. The <dt> tag defines the Item name.
3. The <dd> tag defines the description.
Example for Description List :
<html> <body> <h2> Description List</h2> <dl> <dt>Anshul</dt> <dd>Anshul is good boy</dd> <dt>nitin</dt> <dd>nitin is sweet boy</dd> </dl> </body> </html>
Output:
Description List
- Anshul
- Anshul is good boy
- nitin
- nitin is sweet boy