HTML List


HTML supports ordered, unordered and definition lists:

HTML list

ordered listunordered list
1. first list item
2. second list item
3. third list item

HTML unordered list

An unordered list is a list of items marked with bold dots (typically small black circles).

Unordered lists use <ul> tags

<ul>
<li>Books</li>
<li>Sports</li>
</ul>

The browser displays the following:

  • Books
  • Sports

HTML ordered list

Likewise, an ordered list is a list of items, and the list items are labeled with numbers. An ordered list starts with the <ol> tag. Each list item starts with a <li> tag.

List items are marked with numbers.

<ol>
<li>Books</li>
<li>Sports</li>
</ol>

The browser displays the following:

  1. Books
  2. Sports

A custom list is not just a list of items, but a combination of items and their comments.

A custom list begins with a <dl> tag. Each custom list item begins with <dt>. The definition of each custom list item begins with <dd>.

<dl>
<dt>Books</dt>
<dd>- Study good books</dd>
<dt>Sports</dt>
<dd>- Play Sports in School</dd>
</dl>

Output:

Books
– Study good books
Sports
– Play Sports in School


HTML list tag

LabelDescribe
<ol>Define an ordered list
<ul>define unordered list
<li>define list item
<dl>Definition list
<dt>custom list item
<dd>Define a description for a custom list item

HTML List Abbreviation

<ul> is the abbreviation of unordered lists (unordered list)

<li> is short for list item (list item)

<ol> is an abbreviation for ordered lists (ordered lists)

<dl> is the English abbreviation of definition lists (custom list)

<dt> is the abbreviation of definition term (custom list group)

<dd> is the abbreviation of definition description (custom list description)

<nl> is the abbreviation of navigation lists (navigation list)

<tr> is short for table row (a row in a table)

<th> is an abbreviation for table header cell (the header in the table)

<td> is short for table data cell (a cell in a table)