HTML List Tag



 

In HTML, list tags are used to create lists of items. There are three main types of lists:

1. **Ordered List (`<ol>`)**: A numbered list.
2. **Unordered List (`<ul>`)**: A bulleted list.
3. **Description List (`<dl>`)**: A list of terms and their descriptions.


 1. Ordered List (`<ol>`)

An ordered list creates a numbered list where each item is automatically assigned a number.


**Syntax:**
```html
<ol>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ol>

2. Unordered List (`<ul>`)

An unordered list creates a bulleted list where each item is marked with a bullet point.

**Syntax:**
```html
<ul>
<li>First item</li>
<li>Second item</li>
<li>Third item</li></ul>

 3. Description List (`<dl>`)

A description list is used to list terms and their descriptions. The `<dt>` tag defines the term, and the `<dd>` tag defines the description.

**Syntax:**
```html
<dl>
<dt>HTML</dt>
<dd>HyperText Markup Language</dd>
<dt>CSS</dt>
<dd>Cascading Style Sheets</dd>
<dt>JavaScript</dt>
<dd>A programming language for the web</dd>
</dl>



Post a Comment

0 Comments