Lists are used to group related items together in a structured format. HTML provides several types of lists:
An unordered list is a collection of items where the order does not matter. It is created using the <ul> tag, and each item is defined with the <li> tag.
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
An ordered list is a collection of items where the order does matter. It is created using the <ol> tag, and each item is defined with the <li> tag.
<ol>
<li>First Item</li>
<li>Second Item</li>
<li>Third Item</li>
</ol>
A definition list is used to define terms and their descriptions. It is created using the <dl>, <dt>, and <dd> tags.
<dl>
<dt>Term 1</dt>
<dd>Definition of Term 1</dd>
<dt>Term 2</dt>
<dd>Definition of Term 2</dd>
</dl>
Lists are essential for organizing content on web pages, making it easier for users to read and understand information.