tbody, tfoot, thead element

Type:Tables
Attributes:
See:a table tr

The thead, tbody and tfoot elements are used to define the head, body and footer of a TABLE. A table may contain up to 1 of each element. Any tr elements added directly to the table are actually added to the tbody element, whether it's explicitly defined or not.

The thead, tbody and tfoot tags have no effect unless the table wraps at the end of a page. Then the tbody is split to fit on each page, and the thead and tfoot groups are repeated on each page at the top and bottom of the table respectively.

The tbody, thead and tfoot elements are not supported by most HTML browsers, despite being defined in HTML.

This shows how to lay out a table that will be split over several pages.

<table>
  <thead>
    <tr><td>Heading 1</td><td>Heading 2</td></tr>
  </thead>
  <tbody>
    <tr><td>Cell 1</td><td>Cell 2</td></tr>
    <tr><td>Cell 3</td><td>Cell 4</td></tr>
  </tbody>
  <tfoot>
    <tr><td>Footer 1</td><td>Footer 2</td></tr>
  </tfoot>
</table>