May 03, 2021 HTML5
HTML5 and tbody tags are used to combine the body content 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 hashtag.
The label is used to combine the body content of the HTML table.
The elements should be used in combination with the elements to specify the various parts of the table (body, header, footer).
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, it appears after the element of 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 aligned with the text. |
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. |
Labels support the global properties of HTML.
The tag supports the event properties of HTML.