Lists in HTML

A list is defined as a collection of items which can be customized in 3 different ways.

  1. Ordered list <or>                              
  2. Unordered list <ul>                           
  3. Definition list <dl>
1) HTML Ordered List :
  • An ordered list starts with the <ol> tag. Each list item starts with the <li> tag.
  • The list items are marked with numbers
For example :
<ol>
<.li> College </li>
<li> Class </li>
</ol>

2) HTML Unordered List :
  • An unordered list starts with the <ul> tag. Each list item starts with the <li> tag.
  • The list items are marked with bullets (typically small black circles)
For Example :
<ul>
<li> Books </li>
<li> Pens </li>
</ul>

3)HTML Definition List :
A definition list is a list of items with a description of each item.
  • The <dl> tag defines a definition list.
  • The <dl> tag is used in conjunction with <dt> (defines the item in the list) and <dd> (describes the item in the list).
For example :
<dl>
<dt> coffee </dt>
<dd> black,hot </dd>
<dt> shirt <dt>
<dd> red,long sleeves </dd>
</dl>