HTML Lists

HTML Lists are used to specify the list of items or information. List may contain one or more elements. There are 3 different types of HTML lists:

1. Ordered List or Numbered List(ol)

2. Unordered List or Bulleted List(ul)

3. Description List or Definition List(dl)

HTML Ordered List or Numbered List

In the ordered HTML lists, all the list items are marked with numbers by default. The ordered list starts with <ol> tag and and the list item starts with <li> tag.

Example
<ol>
<li>C</li>
<li>C++</li>
<li>Java</li>
<li>Php</li>
<li>.Net</li>
</ol>

Here ordered list starts with the <ol> tag and ends with the </ol> tag. In ordered list list items are printed in numeric ordered form.

HTML Unordered List or Bulleted List:

In HTML Unordered list starts with the <ul> tag and list items are started with the <li> tag, In unordered list, all the list items are marked with bullets.

Example
<ul>
<li>C</li>
<li>C++</li>
<li>Java</li>
<li>Php</li>
<li>.Net</li>
</ul>

Here unordered list starts with <ul> and ends with </ul> tag.

HTML Description List or Definition List:

HTML Description list is also a list style which is supported by HTML and XHTML. It is also known as definition list where entries are listed like a dictionary or encyclopedia.

The definition list is very appropriate when you want to present glossary, list of terms or other name-value list.

The HTML definition list contains following three tags:

<dl> tag defines the start of the list.

<dt> tag defines a term.

<dd> tag defines the term definition.

Example
<dl>  
 <dt>C</dt>  
 <dd>-C Language.</dd>  
 <dt>Java</dt>  
 <dd>-Java Language</dd>  
 <dt>Php</dt>  
 <dd>-Serverside scripting language.</dd>  
 <dt>.Net</dt>  
 <dd>-.Net Language</dd>   
 </dl>