loading

HTML Lists


Web developers can organize a collection of similar elements into lists using HTML lists.


Example

An unordered HTML list:

  • Item
  • Item
  • Item
  • Item

An ordered HTML list:

  1. First item
  2. Second item
  3. Third item
  4. Fourth item

Unordered HTML List

A list that is not sorted begins with the <ul> tag. The <li> tag comes first on every list item.

By default, the list elements will be indicated with bullets, which are tiny black circles:

Example

				
					<ul>
  <li>Water</li>
  <li>Ice</li>
  <li>Air</li>
</ul>
				
			

Ordered HTML List

The <ol> tag indicates that the list is sorted. The <li> tag comes first on every list item.

By default, numbers will be used to indicate the list items:

Example

				
					<ul>
  <li>Water</li>
  <li>Ice</li>
  <li>Air</li>
</ul>
				
			

HTML Description Lists

Lists of descriptions are also supported by HTML.

A list of terms along with a definition for each phrase is called a description list.

The description list is defined by the <dl> tag, terms are defined by the <dt> tag and each term is described by the <dd> tag:

Example

				
					<dl>
  <dt>Tea</dt>
  <dd>- black hot drink</dd>
  <dt>Milk</dt>
  <dd>- white cold drink</dd>
</dl>

				
			

HTML List Tags

Tag Description
<ul> Defines an unordered list
<ol> Defines an ordered list
<li> Defines a list item
<dl> Defines a description list
<dt> Defines a term in a description list
<dd> Describes the term in a description list
Share this Doc

HTML Lists

Or copy link

Explore Topic