Dev.to WebDev 🛠 Dev 👁 1

Lists in HTML

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 w

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>
📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.