Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML tag

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

table

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the tag.


Tag Definition and Usage Notes

The tag is used to group the footer content in an HTML table. The element should be used in conjunction with the [ ](tag-thead.html) and [](tag-tbody.html) elements to specify the various parts of a table (footer, header, body).

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 a

Tips and Notes

Note:

Tip:


Differences between HTML 4.01 and HTML5

In HTML5, the in HTML 4.01 is no longer supported


property

as a child element of the element, appearing and after the element, and before the element. The element must contain one or more tag., andelements do not affect the table layout by default. However, you can use CSS to style these elements and change the table's appearance. any attributes of the tag.
,
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).