Skip to main content

HTML Lists

HTML lists enable web developers to arrange a collection of related objects into lists.

Unordered HTML List

The <ul> tag denotes an unordered list. Each list item is preceded by the <li> tag.

By default, the list items will be highlighted with bullets (little black circles):

Example
<ul>
<li>Tea</li>
<li>Coffee</li>
<li>Milk</li>
</ul>
  • Tea
  • Coffee
  • Milk

Ordered HTML List

The <ol> tag denotes an ordered list. Each list item is preceded by the <li> tag.

By default, the list elements will be labelled with numbers:

Example
<ol>
<li>Tea</li>
<li>Coffee</li>
<li>Milk</li>
</ol>
  1. Tea
  2. Coffee
  3. Milk

HTML Description Lists

HTML also allows for description lists.

A description list is a set of words that each have a description.

The description list is defined by the <dl> tag, the term (name) is defined by the <dt> tag, and each term is described by the <dd> tag:

Example
<dl>
<dt>Milk</dt>
<dd>- white cold drink</dd>
<dt>Coffee</dt>
<dd>- black hot drink</dd>
</dl>
Milk
- white cold drink
Coffee
- black hot drink
Try it yourself
Loading...