HTML Lists


Go to main Page

Lists in HTML

In HTML three lists allow a web developer to group the items specified in lists.

These three types of lists are explained below.

1)Ordered List

In this type of list, all the items are ordered with numbers 1,2,3, and so on.

Example

<ol>
    <li>Item one</li>
    <li>Item two</li>
    <li>Item three</li>
    <li>Item four</li>
</ol>
  

Explaination

<ol> tag is used to create an ordered list.

<li> tag is used to create list items you can create multiple items.


1)Unordered List

In this type of list, all the items are unordered with bullets.

Example

<ul>
    <li>Item one</li>
    <li>Item two</li>
    <li>Item three</li>
    <li>Item four</li>
</ul>
  

Explaination

<ul> tag is used to create an unordered list.

<li> tag is used to create list items you can create multiple items.


2)Description List

A description list is a list of terms, with a description of each item.

Example

<dl>
    <dt>C++</dt>
    <dd>- Programming Language</dd>
    <dt>HTML</dt>
    <dd>- Markup Language</dd>
  </dl>
  

Explaination

<dl> tag is used to create description list.

<dd> tag is used to create list items description.