HTML / HTML Tags

HTML <Tfoot> Tag

Dec 12, 2022
1 min read
HTML tfoot Tag

Definition

A <tfoot> tag is used to define a group of footer-related table rows.

Example

<table>
  <caption>This is the table's caption</caption>
    <thead>
        <tr>
            <th colspan="2">The table header with one column</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>The table body</td>
            <td>with two columns</td>
        </tr>
    </tbody>
    <tfoot>
       <tr>
          <td>Footer cell 1</td>
          <td>Footer cell 2</td>
        </tr>
    </tfoot>
</table>

Usage

  • The opening tag is required.
  • The closing tag can be omitted if there is no more content in the parent element.
  • This <tfoot> can be placed as a child of a <table> element after any <caption>,<colgroup>, <tbody>, <thead>, and <tr> elements. Only one <tfoot> element is permitted in a <table> element.
  • The <tfoot> may contain zero or more <tr> elements.

Attributes

The <tfoot> element only supports the Global Attributes.

Specification

Browser Support

Desktop

ChromeEdgeFirefoxIEOperaSafari
YesYesYesYesYesYes

Mobile

Android WebviewChrome AndroidFirefox AndroidOpera AndroidiOS SafariSamsung Internet
YesYesYesYesYesYes