thead tbody tfoot Structure
Organize table rows into semantic header, body, and footer sections.
Sections of a Table
A complete HTML table has three optional but recommended sections:
<thead>— header rows<tbody>— body rows (main data)<tfoot>— footer rows (totals, summaries)
thead
The <thead> element wraps header rows:
<table>
<thead>
<tr>
<th>Product</th>
<th>Quantity</th>
<th>Price</th>
</tr>
</thead>
...
</table>
<!-- thead rows repeat when printing multi-page tables -->
<!-- Screen readers associate header cells with data cells -->All lessons in this course
- table tr td and th
- thead tbody tfoot Structure
- colspan and rowspan for Spanning
- Table Accessibility scope summary caption