In this section, we will learn what HTML <thead> element is and how to use it.
What is <thead> Tag in HTML?
HTML <thead> element stands for Table Header and we use it when we want to group the header part of a table.
A table typically is divided into three parts: header, body, and footer.
The header part most of the time is just one row with a couple of cells and the content in each cell is in bold face.
This header part is created via HTML <tr> element. But we use <tr> element to create other rows on a table as well.
So in order to separate the header row/s from the rest of a table (group-wise) we can use the <thead> element.
HTML <thead> Tag Syntax:
<thead> value </thead>
Example: using <thead> tag in HTML
See the Pen using <thead> tag in HTML by Omid Dehghan (@odehghan) on CodePen.