The HTML <thead> tag
Quick answer
The HTML <thead> element groups the header rows of a <table>, separating them from the <tbody> data and <tfoot>. It contains one or more <tr> rows of header cells.
Overview
The <thead> element marks the header section of a table — the rows of column labels at the top. It contains <tr> rows made of <th> header cells.
Grouping the headers this way does three useful things: it clarifies the table's structure, it lets you style the header independently of the body, and it allows browsers to repeat the header when a long table is printed across multiple pages — so each page still shows the column labels.
Syntax
<thead>
<tr><th scope="col">Name</th><th scope="col">Score</th></tr>
</thead>
Example
<table border="1">
<thead><tr><th>Name</th><th>Score</th></tr></thead>
<tbody><tr><td>Ada</td><td>99</td></tr></tbody>
</table>
Best practices
Frequently asked questions
What is the thead element?
It groups the header rows of a table — the rows of column labels — into a distinct section.
Does thead repeat when a table is printed?
Yes. Browsers can repeat the
<thead> at the top of each printed page of a long table.Is thead required?
No, but it is recommended — it clarifies structure, aids styling and enables header repetition on print.