# Tables — HTML

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

> Rows and columns for tabular data.

## thead, tbody, tr, td

`<table>` holds `<tr>` rows; `<th>` is a header cell, `<td>` a regular data cell.

```html
<table>
  <thead>
    <tr><th>Name</th><th>Score</th></tr>
  </thead>
  <tbody>
    <tr><td>Ada</td><td>92</td></tr>
    <tr><td>Bo</td><td>85</td></tr>
  </tbody>
</table>
```

## Merging cells

`colspan` merges cells across columns, `rowspan` merges across rows — useful for grouped headers.

**Quiz:** Which tag defines a header cell in a table?

- [ ] <td>
- [ ] <tr>
- [x] <th>

*Answer:* <th>. `<th>` marks a header cell — bold and centered by default, and meaningful to assistive tech.
