Loading...
HTML <tfoot> Tag

HTML <tfoot> Tag

In this tutorial, we will learn about tfoot tag in HTML with the help of examples.


<tfoot> Tag

Tfoot tag <tfoot> is used to add footer to the HTML table.

Note : The <tfoot> tag is used as child of the <table> tag and in conjunction with the <thead> and <tbody> tag to specify each part of the HTML table.

Syntax

<tfoot>..........</tfoot>

Example

<!DOCTYPE html>
<html>
  <head>
    <title>tfoot tag</title>
  </head>
  <body>
    <table>
      <thead>
      <tr>
        <th>First Name</th>
        <th>Last Name</th>
        <th>Age</th>
      </tr>
      </thead>
      <tbody>
      <tr>
        <td>Sunny</td>
        <td>Chaudhary</td>
        <td>20</td>
      </tr>
      <tr>
      </tbody>
      <tfoot>
        <td>Anu</td>
        <td>Chaudhary</td>
        <td>19</td>
      </tr>
      </tfoot>
    </table>
  </body>
</html>

Output

Image Not Loaded

Specific Attribute

Attribute Value Description
align right
left
center
justify
char
It is used for visual alignment
char character It is used to specify which character to align text on. It is used when align = char
charoff pixels
percentage(%)
It is used to specify an alignment offset(either in pixels or percentage value) against the first character as specified with the char attribute. It is used when align = char
valign top
middle
bottom
baseline
It is used for vertical alignment

Global Attribute

Tfoot Tag support all the global attributes of HTML.


Event Attribute

Tfoot Tag support all the event attributes of HTML.


Next Tutorial

We hope that this tutorial helped you develop better understanding of the concept of <tfoot> tag in HTML.

Keep Learning : )

In the next tutorial, you'll learn about HTML <th> Tag.

- Related Topics