Next / Previous / Contents / TCC Help System / NM Tech homepage

11.2. Sectioning a table with thead, tbody, and tfoot

The body of a table may consist of a sequence of tr (table row) elements. However, in this case, if the table is printed, any headings or footers of the table will appear only once.

If your table is large and you would like a more usable printed rendering, structure the table as a thead element containing the heading row or rows, followed optionally by a tfoot element containing the footer row or rows, followed by one or more tbody elements with the main part of the table. If you use this structure, a printed rendering of the table will repeat the heading and footer on each page.

As an example, here is a slightly more elaborate version of the state capital and bird table above, using this triune structure.

        <th>State name</th>
        <th>State capital</th>
        <th>State bird</th>
        <td>New Mexico</td>
        <td>Santa Fe</td>
        <td>Greater Roadrunner</td>
        <td>Cactus Wren</td>