Skip to main content

The <tfoot> Element

As defined in the HTML Living Standard, the <tfoot> element represents the block of rows that consist of the column summaries (footers) for the parent <table> element.

Visual Example (Financial Summary):

Month Savings
January $100
February $80
Sum $180
<table> <thead>...</thead> <tbody>...</tbody> <tfoot> <tr> <td>Total</td> <td>$1,000</td> </tr> </tfoot> </table> View HTML Living Standard: The tfoot element

Placement and Structure

The <tfoot> element has specific rules regarding its position within a <table>:

WCAG Requirement: Info and Relationships

Success Criterion 1.3.1 (Level A): Information, structure, and relationships conveyed through presentation can be programmatically determined.

By using <tfoot>, you explicitly identify the "totals" or "summaries" of your data. For a screen reader user, this programmatic grouping is essential for distinguishing the final results from individual data rows. Some browsers and printers use this tag to ensure the table footer repeats at the bottom of every printed page if a table spans multiple sheets, ensuring the relationship remains perceivable in all media.

Understand SC 1.3.1: Info and Relationships

Best Practices

A11y Tip: Large Tables

In extremely long tables, a footer helps anchor the user. Ensure that your <tfoot> cells align perfectly with the <thead> columns so that the programmatic and visual summaries are in sync.