In HTML, lists are used to group related items together. There are different types of list in HTML. They are,
1. Unordered list:
Used for items where the order does not matter. By default, these items are displayed with bullet points.
<ul>
<li>Water</li>
<li>Coffee</li>
<li>Tea</li>
</ul>
2. Ordered list:
Used for items where the sequence or order matters.By default, these are displayed with numbers.
<ol>
<li>Cake</li>
<li>Chocalate</li>
<li>Juice</li>
</ol>
3. Description List
Used for pair of terms and description.
<dl>
<dt>HTML</dt>
<dd>HyperText Markup Language</dd>
<dt>CSS</dt>
<dd>Cascading Style Sheets.</dd>
</dl>
Top comments (0)