Advertisement

Google Ad Slot: content-top

List

~1 min read · HTML
On this page

In HTML, you can create different types of lists to organize content. The most common types are ordered lists, unordered lists, and definition lists.

1. Unordered List (<ul>)

An unordered list displays items with bullet points.

Example
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
Try it yourself

2. Ordered List (<ol>)

An ordered list displays items with numbers.

Example
<ol>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ol>
Try it yourself

3. Definition List (<dl>)

A definition list is used to define terms and their descriptions.

Example
<dl>
<dt>Term 1</dt>
<dd>Description of Term 1.</dd>
<dt>Term 2</dt>
<dd>Description of Term 2.</dd>
</dl>
Try it yourself

Styling Lists

Lists can be styled using CSS to change bullet styles, number types, indentation, and more.

Example
<ul style="list-style-type: square;">
<li>Item 1</li>
<li>Item 2</li>
</ul>
Try it yourself