HTML Lists

List is group of homogeneous items, displayed together. HTML also provide three types of tags that can represent list in web document. These three types of lists are.

Un-ordered Lists

Ul tag is used for creating un-ordered list. Here un-ordered refer that there will not any kind of counting is used for list items. We only can count these items manually. In place of numbers special characters are used in start each list item as start of list item. We can change this symbol by using CSS style. The possible styles may circle, disk, square or maybe any other. By default disk style is displayed.

Example

<ul>
  <li>First Item</li>
  <li>Second Item</li>
  <li>Third Item</li>
</ul>

Output

  • First Item
  • Second Item
  • Third Item

Ordered Lists

Another type of list is ordered list, in which term ordered means all items of the list are numbered. This number sequence can set as ascending or descending order. By default this is in ascending order.

Example

<ol>
  <li>One</li>
  <li>Two</li>
  <li>Three</li>
</ol>

Output

  1. One
  2. Two
  3. Three

HTML Description List

Another important but not frequently used type of list can be displayed using html dl element. This list contains list items as well as their description. Here list items refer as list terms. Each term may or may not have description. Tag dd (data description) is used for items description. Here are the list of tags that are used for displaying description list.

  1. dl (parent tag)
  2. dt (data term)
  3. dd (data description)

Example

<dl>
   <dt>Web Designers</dt>
   <dd>These person use HTML and CSS to Design Web pages</dd>
   <dt>Backend Developers</dt>
   <dd>These person write server side scripts</dd>
   <dt>Data Administrators</dt>
   <dd>These person handle data in database systems</dd>
</dl>
Comments
Login to TRACK of Comments.