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
Chrome | Edge | Firefox | IE | Opera | Safari |
---|---|---|---|---|---|
Yes | Yes | Yes | Yes | Yes | Yes |
Mobile
Android Webview | Chrome Android | Firefox Android | Opera Android | iOS Safari | Samsung Internet |
---|---|---|---|---|---|
Yes | Yes | Yes | Yes | Yes | Yes |