HTML tag
Example
An HTML table with , , and elements:
<
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
tableTry it »
Browser support





All major browsers support the tag.
Tag Definition and Usage Notes
The tag is used to group the header content in an HTML table. The element should be used in conjunction with the [ ](tag-tbody.html) and [](tag-tfoot.html) elements to specify the various parts of a table (header, body, footer).By using these elements, browsers can support scrolling of the table body independently of the header and footer. When a long table spanning multiple pages is printed, the header and footer can be printed on every page containing table data.
The tag must be used in the following context: as aTips and Notes
Note:
Tip:
Differences between HTML 4.01 and HTML5
In HTML5, the in HTML 4.01 is no longer supported
property
| property | Value | Description |
|---|---|---|
| align | right |
left
center
justify
char | HTML5 does not support。定义 元素中内容的对齐方式。 |
| char | character | Not supported in HTML5. Specifies the character based on which the content of the element is aligned. | | charoff | number | Not supported in HTML5. Specifies the offset of the first alignment character in the content of the element. | | valign | top
middle
bottom
baseline | Not supported in HTML5. Specifies the vertical alignment of the content of the element. |
Global Attributes
The tag supports [HTML Global Attributes](/tags/ref-standardattributes.html).
Event attribute
The tag supports [HTML Event Attributes](/tags/ref-eventattributes.html).