Menu
Lists & Tables

<table>, <tr>, <th>, <td>

Tabular data with rows, headers, and cells.

1Building a Table

<table> wraps tabular data. Rows are <tr>, header cells are <th>, data cells are <td>. Always pair with <thead>, <tbody>, and a <caption>.

Example Code
<table>
  <caption>Monthly sales</caption>
  <thead>
    <tr><th>Month</th><th>Sales</th></tr>
  </thead>
  <tbody>
    <tr><td>Jan</td><td>$1,200</td></tr>
    <tr><td>Feb</td><td>$1,800</td></tr>
  </tbody>
</table>

Finished reading?

Mark this topic as complete to track progress.