HTML Lists

HTML Lists are used to group related pieces of information together. There are three types of Lists are available in HTML – unordered list , ordered list and definition list.

Unordered List

HTML Unordered lists are recommended to be used with a list of items where order is irrelevant. An unordered list starts with the < ul > tag. Each list item starts with the < li > tag.

HTML Source Code :

<ul>
  <li>VB.Net</li>
  <li>Csharp</li>
  <li>Asp.Net</li>
</ul>

The default bullet type for most web browsers is a black circle, but you can changed the default circle by using an HTML attribute called Type.

HTML Source Code :

<ul type="square">
  <li>VB.Net</li>
  <li>Csharp</li>
  <li>Asp.Net</li>
</ul>

Ordered List

HTML ordered list should contain information where order should be emphasized, An ordered list starts with the < ol > tag. Each list item starts with the < li > tag.

HTML Source Code :

<ol>
  <li>VB.Net</li>
  <li>Csharp</li>
  <li>Asp.Net</li>
</ol>

Definition List

Un-ordered list and Ordered List are single item list, each < li > tag cam makes one list item. In some cases you have to define more than one item in a list , then you can use Definition List. HTML Definition List start with < dl > tag and each sub heading start with < dt > tag and details start with < dd > tag.

HTML Source Code :

<dl>
  <dt>Desktop Development
    <dd>VB.Net</dd>
    <dd>Csharp</dd>
  <dt> Web Development
    <dd>Asp.Net</dd>
</dl>