HTML5 <thead> Tag


An HTML table with a thead, tfoot, and a tbody element:

Code it Online »

Definition and Usage

The <thead> tag is used to group the header content in an HTML table.

The thead element should be used in conjunction with the tbody and tfoot elements.

The tbody element is used to group the body content in an HTML table and the tfoot element is used to group the footer content in an HTML table.

Note: <tfoot> must appear before <tbody> within a table, so that a browser can render the foot before receiving all the rows of data.

Note: these elements will not affect the layout of the table by default. However, you can use CSS to let these elements affect the table's layout.

Differences Between HTML 4.01 and HTML5

None of the HTML 4.01 attributes are supported in HTML5.

Tips and Notes

Note: The <thead> must have a <tr> tag inside

Note: If you use one of the thead, tfoot and tbody elements, you should use all of them.

Note: The td element is not allowed in the thead element.


Attribute Value Description
align right
Not supported in HTML5
char character Not supported in HTML5
charoff number Not supported in HTML5
valign top
Not supported in HTML5

Standard Attributes

The <thead> tag also supports the Standard Attributes in HTML5.

Event Attributes

The <thead> tag also supports the Event Attributes in HTML5.

Have Any Suggestion? We Are Waiting To Hear from YOU!

Your Query was successfully sent!