List

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


Whereisstuff is simple learing platform for beginer to advance level to improve there skills in technologies.we will provide all material free of cost.you can write a code in runkit workspace and we provide some extrac features also, you agree to have read and accepted our terms of use, cookie and privacy policy.
© Copyright 2024 www.whereisstuff.com. All rights reserved. Developed by whereisstuff Tech.