HTML Lists Overview

HTML Lists

1. Unordered List (<ul>)

The <ul> tag defines an unordered list, which is a list of items where the order does not matter. List items are typically displayed with bullet points.

HTML Example:

<ul>
    <li>Item 1</li>
    <li>Item 2</li>
    <li>Item 3</li>
</ul>

Explanation:

2. Ordered List (<ol>)

The <ol> tag defines an ordered list, where the items are listed in a specific order, typically numbered.

HTML Example:

<ol>
    <li>First item</li>
    <li>Second item</li>
    <li>Third item</li>
</ol>

Explanation:

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

3. Description List (<dl>)

The <dl> tag defines a description list, which is a list of terms and their descriptions. Each term is defined using the <dt> tag, and its corresponding description is provided with the <dd> tag.

HTML Example:

<dl>
    <dt>HTML</dt>
    <dd>A markup language for creating web pages.</dd>
    <dt>CSS</dt>
    <dd>A stylesheet language used to style HTML content.</dd>
</dl>

Explanation:

HTML
A markup language for creating web pages.
CSS
A stylesheet language used to style HTML content.
Previous Next
Modern Footer