📋 Chapter 4: List Types in HTML

1️⃣ Unordered List (`<ul>`)

An unordered list displays items with bullets.

<ul>
  <li>HTML</li>
  <li>CSS</li>
  <li>JavaScript</li>
</ul>

2️⃣ Ordered List (`<ol>`)

An ordered list displays items with numbers.

<ol>
  <li>Install VS Code</li>
  <li>Write HTML</li>
  <li>Open in browser</li>
</ol>
  1. Install VS Code
  2. Write HTML
  3. Open in browser

3️⃣ Description List (`<dl>`)

A description list contains terms and their definitions.

<dl>
  <dt>HTML</dt>
  <dd>HyperText Markup Language</dd>
  <dt>CSS</dt>
  <dd>Cascading Style Sheets</dd>
</dl>
HTML
HyperText Markup Language
CSS
Cascading Style Sheets

4️⃣ Nested Lists

You can place a list inside another list.

<ul>
  <li>Fruits
    <ul>
      <li>Apple</li>
      <li>Banana</li>
    </ul>
  </li>
  <li>Vegetables
    <ul>
      <li>Carrot</li>
      <li>Spinach</li>
    </ul>
  </li>
</ul>

🧪 Practice: Try It Yourself

Type your own list code and click "Show Preview" to test it!