HTML Lists Tags Examples


The HTML Lists are one type of group item and it's displayed on a webpage. there are three types of HTML lists.

Unordered HTML Lists

The HTML <ul> element defines an unordered list of items, typically rendered as a bulleted list.

Example
<ul>
    <li>Red</li>
    <li>Green</li>
    <li>Yellow</li>
</ul>
Output
  • Red
  • Green
  • Yellow

list-style-type property

There are four types of values in list-style-type property on CSS. such as disc, circle, square, and none. see the below example of a list-style-type property. here we explain one example. remain examples are the same as but only change the property value.

Example
<ul style="list-style-type:disc;">
  <li>Red</li>
  <li>Green</li>
  <li>Yellow</li>
</ul>
Output
  • Red
  • Green
  • Yellow

Ordered HTML Lists

The HTML <ol> element defines an ordered list of items — typically rendered as a numbered list.

Example
<ol>
  <li>Red</li>
  <li>Green</li>
  <li>Yellow</li>
</ol>
Output
  1. Red
  2. Green
  3. Yellow

Description HTML Lists

The HTML <dl> element defines a description list. The HTML <dt> element defines a description term. The HTML <dd> element defines a specific term's definition.

Example
<dl>
    <dt>Red</dt>
    <dd>Red is the color of fire and blood, so it is associated with energy, war, danger, strength, power, determination as well as passion, desire, and love. Red is a very emotionally intense color..</dd>
    <dt>Green</dt>
    <dd>Green, the color of life, renewal, nature, and energy, is associated with meanings of growth, harmony, freshness, safety, fertility, and environment.</dd>
</dl>
Output
Red
Red is the color of fire and blood, so it is associated with energy, war, danger, strength, power, determination as well as passion, desire, and love. Red is a very emotionally intense color..
Green
Green, the color of life, renewal, nature, and energy, is associated with meanings of growth, harmony, freshness, safety, fertility, and environment.