HTML <tfoot> Element

The <tfoot> element groups one or more footer rows in an HTML table. It is commonly used for totals, summaries, or other information that relates to the table's columns.

Syntax

<table>
  <tbody>
    <tr>
      <td>Item</td>
      <td>$10.00</td>
    </tr>
  </tbody>
  <tfoot>
    <tr>
      <th>Total</th>
      <td>$10.00</td>
    </tr>
  </tfoot>
</table>

Attributes

The <tfoot> element supports the global HTML attributes. It does not have any element-specific attributes.

Example

This example uses <tfoot> to separate the total row from the main product data in the table body.

Play in Editor

Usage Notes

The <tfoot> element is placed inside a <table> and contains one or more <tr> elements. It identifies rows that form the footer of the table.

A table can use <thead>, <tbody>, and <tfoot> to divide its rows into meaningful structural groups. This can make larger tables easier to understand, style, and maintain.

The <tfoot> element should appear after any <thead> and <tbody> elements in modern HTML.

Accessibility

The <tfoot> element provides structural information about footer rows but does not replace proper table headers. Use <th> elements where cells serve as headings, and make sure header and data relationships remain clear to users of assistive technologies.

Browser Support

Baseline: Widely available indicates a feature has been supported by core browsers for at least 30 months. At this stage, the feature is considered stable and safe for most websites to use without needing to worry about compatibility issues or fallbacks, as it is supported by the vast majority of users' devices and browser versions.

For detailed browser compatibility information, see Can I Use: HTML <tfoot> Element .

The <tfoot> element is used with other table elements, including <table>, <thead>, <tbody>, <tr>, <th>, and <td>.

Specifications

The <tfoot> element is defined in the WHATWG HTML Living Standard .