HTML Tag Reference - HTML tag <tfoot>








All <table> elements can be divided into three parts: <thead>, <tbody>, and <tfoot>. <thead> contains the rows in the table header. <tbody> contains the rows in the table body. <tfoot> contains the rows in the table footer.

<thead>, <tbody>, and <tfoot> elements with the <table> element inform the browser the breakdown of the sections.

Browser compatibility

<tfoot> Yes Yes Yes Yes Yes

What's new in HTML5

All HTML 4.01 attributes are deprecated in HTML5.





Attribute

Attribute Value Description
align right
left
center
justify
char
Not supported in HTML5.
Aligns the tfoot content
char character Not supported in HTML5.
Aligns the tfoot content to a character
charoff number Not supported in HTML5.
Sets the number of characters to align the tfoot content from the character in char attribute
valign top
middle
bottom
baseline
Not supported in HTML5.
Vertical aligns the tfoot content




Global Attributes

The <tfoot> tag supports the Global Attributes in HTML.

Event Attributes

The <tfoot> tag supports the Event Attributes in HTML.

Default CSS Settings

tfoot {
    display: table-footer-group;
    vertical-align: middle;
    border-color: inherit;
}

Example

<html>
<body>
     <table>
          <tbody>
               <tr>
                    <td>This cell is in the tbody rows group.</td>
                    <td>This cell is in the tbody rows group.</td>
                    <td>This cell is in the tbody rows group.</td>
               </tr>
          </tbody>
          <tfoot>
               <td>This cell is in the tfoot rows group.</td>
               <td>This cell is in the tfoot rows group.</td>
               <td>This cell is in the tfoot rows group.</td>
          </tfoot>
     </table>
</body><!--   w  w  w  . j  av  a  2 s  . com-->
</html>

Click to view the demo