HTML <thead> Tag


The HTML element specifies a collection of rows that comprise the column heads in an HTML table.

This tag is also widely known as the element.

Browsers can utilize these components to enable table body scrolling independent of the header and footer. Furthermore, when printing a huge table that covers numerous pages, these features allow the table header and footer to be printed at the top and bottom of each page.

It should be noted that the element must have one or more tags.

The <thead> tag should be used as a child of a table element, after any <caption> and <colgroup> elements, and before any <tbody>, <tfoot>, and <tr> elements.

By default, the thead, tbody, and tfoot components have no effect on the table's layout. However, you may style these components using CSS (see example below)!

Syntax

Example

Preview

Supported Browsers

Element Chrome Firefox Safari Edge / IE Opera
<thead> Yes Yes Yes Yes Yes