# Lists — HTML

Source: https://www.geekswithgeeks.com/en/html/html-lists

> Ordered, unordered and description lists.

## ul and ol

`<ul>` gives bullets, `<ol>` gives numbers; each item is an `<li>`.

```html
<ul>
  <li>Tea</li>
  <li>Coffee</li>
</ul>

<ol>
  <li>Preheat oven</li>
  <li>Bake for 20 minutes</li>
</ol>
```

## Nested lists

Put a whole `<ul>` or `<ol>` inside an `<li>` to create sub-items.

```html
<ul>
  <li>Fruits
    <ul>
      <li>Apple</li>
      <li>Banana</li>
    </ul>
  </li>
</ul>
```

## Description lists

`<dl>` pairs terms with definitions using `<dt>` (term) and `<dd>` (description) — handy for glossaries.
