HTML List

HTML List

HTML List are used to display related information in a list. HTML has three types of lists.

1. OL – Ordered List
2. UL – Unordered List
3. DL – Definition List
In this we ll learn all about HTML list tags.
1. <OL> – Orderded List. : –

ordered list, created using the <ol> tag, and each list item starts with the <li> tag.

<ol>
<li>Apple</li>
<li>Mango</li>
<li>Banana</li>
</ol>

list items will be display with numbers by default. And we can change them with some of attributes.
type=”1″ The list items will be numbered with numbers (default)
type=”A” The list items will be numbered with uppercase letters
type=”a” The list items will be numbered with lowercase letters
type=”I” The list items will be numbered with uppercase roman numbers
type=”i” The list items will be numbered with lowercase roman numbers

<ol type=”I”>
<li>Apple</li>
<li>Mango</li>
<li>Banana</li>
</ol>

2.<UL> unorderded List. : –

ordered list, created using the <ul> tag, and each list item starts with the <li> tag.

<ul>
<li>Apple</li>
<li>Mango</li>
<li>Banana</li>
</ul>

The list items will be displayed with bullets (small black circles) by default. . And we can change them with some of attributes.

list-style-type:disc Sets the list item marker to a bullet (default)
list-style-type:circle Sets the list item marker to a circle
list-style-type:square Sets the list item marker to a square
list-style-type:none The list items will not be marked
<ul style=”list-style-type: square “>
<li>Apple</li>
<li>Mango</li>
<li>Banana</li>
</ul>

3. <DL> Definition List. : –

Defination list, created using the <dl> tag, and each list item have defiation title and definition description.
<dt> stands for definition title and
<dd> definition description.

Example
<dl>
<dt>Mango</dt>
<dd>it’s a fruite.</dd>
<dt>Apple</dt>
<dd>its also a frute but too much good for health.</dd>
</dt>