May 03, 2021 HTML5
HTML5 and tfoot tags are used to represent the footer in a table. Please refer to the following example:
HTML tables with elements of the elements of the .
<table border="1">
<thead>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
</thead>
<tfoot>
<tr>
<td>Sum</td>
<td>$180</td>
</tr>
</tfoot>
<tbody>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</tbody>
</table>
All major browsers support the hashtags.
The label is used to combine the footer content of an HTML table.
The elements should be used in combination with the elements of the slt;thead and the elements of the table to specify the parts of the table (footer, header, body).
By using these elements, the browser has the ability to support table body scrolling independent of the table header and table footer. When a long table with multiple pages is printed, the table header and footer of the table can be printed on each page that contains the table data.
The label must be used in the following situations: as a child element of the element, before the element of the element, after the element of the element, and after the element, the element of the .lt;tbody and the element of the .lt;tbody and the element.
Note: The inside of the element must contain one or more labels.
Tip: The default of the elements does not affect the layout of the table. However, you can use CSS to define styles for these elements to change the appearance of the table.
In HTML 5, no longer supports any properties of the label in HTML 4.01.
Property | Value | Describe |
---|---|---|
align |
right
left center justify char |
HTML5 is not supported. Defines the alignment of content in the element. |
char | character | HTML5 is not supported. Specifies which character the content in the element is text-aligned to. |
charoff | number | HTML5 is not supported. Specifies the offset of the first aligned character of the content in the element. |
valign |
top
middle bottom baseline |
HTML5 is not supported. Specifies the vertical alignment of the content in the element. |
The label supports the global properties of HTML.
The tag supports the event properties of HTML.