0Pricing
HTML Academy · Lesson

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

  1. table tr td and th
  2. thead tbody tfoot Structure
  3. colspan and rowspan for Spanning
  4. Table Accessibility scope summary caption
← Back to HTML Academy