You are on page 1of 3

Creating Lists in HTML

There are three types of lists we can create in HTML.


1) Unordered Lists
2) Ordered Lists
3) Description Lists

How to Make Unordered List in HTML?


To create unordered list, we have tag <ul> </ul>. This defines the unordered list and the tags
<li></li> defines the elements in list.
Unordered list contains an attribute list-style-type which have following values.
1. Disc
2. Circle
3. Square
4. None
Example: <ul style=” list-style-type: disc”>
<li> Monitor </li>
<li> CPU </li>
<li> Keyboard </li>
</ul>

How to create HTML Ordered List?


The HTML <ol> tag defines the ordered list. An ordered list can be of number or alphabet.
Ordered list have an attribute type which defines the type of item marker. The attribute can have
following values:
1) type= ”1”
2) type= “A”
3) type= “a”
4) type = “I”
5) type = “i”
Ordered list also have start attribute which defines from where the list should be stated.
Example:
<ol type= “1” start= “5”>
<li> Mathematics </li>
<li> Economics </li>
<li> Computer </li>
</ol>

How to create HTML Description List?


The HTML <dl> tag defines the description list. Description list are the list with their
description.
The <dt> tag defines the term name and <dd> tag defines the description of each term.
Example:
<dl>
<dt>Mouse</dt>
<dd>
it is input device.
</dd>
<dt>Mouse</dt>
<dd>
it is input device.
</dd>
<dt>Mouse</dt>
<dd>
it is input device.
</dd>
</dl>

You might also like