Skip to main content
Albero Academy

Tables

Present tabular data with rows, cells and headers.

Text & Links8 min

Tables present genuinely tabular data — rows and columns of related values. They're built from a few nested elements.

Table structure

a semantic table
<table>
<thead>
<tr>
<th>Name</th>
<th>Score</th>
</tr>
</thead>
<tbody>
<tr>
<td>Aanya</td>
<td>82</td>
</tr>
</tbody>
</table>
ElementIs
<table>The whole table
<tr>A table row
<th>A header cell (bold, and read as a header)
<td>A data cell
<thead>/<tbody>Group header and body rows

Key takeaways

  1. 01Tables present tabular data: <table>, <tr> (rows), <th> (headers), <td> (data cells).
  2. 02<thead>/<tbody> group header and body rows.
  3. 03Use <th> so screen readers announce header cells; add a <caption>.
  4. 04Never use tables for page layout — use CSS.

Finished this chapter?

Mark it complete to track your progress through HTML.