<tfoot> : Table Foot element

Introduction

The <tfoot> element in HTML represents the footer section of a table. It is used to define the footer rows of a table, which typically contain summary information or totals for the data presented in the table.

Here’s how you might use <tfoot> in conjunction with <tbody> and <thead> in an HTML table:

Output :

In this example, we show the footer section different from the other section by applying background color on <tfoot> and the <tfoot> element contains one or more <tr> (table row) elements, each representing a row of footer information for the table. These footer rows typically appear below the body content of the table, but before any other content outside the table.

The <tfoot> section is useful for providing summary or aggregate data for the entire table, such as totals or averages. It helps to distinguish this summary information from the main body of the table while maintaining a semantic structure.

Leave a Comment