html Thead Tag

In the html <thead> tag is used to the group content at html table header place. Mostly we will use <tbody> and <tfoot> tag inside of <thead> tag. In the <tbody> tag is used to group content header place. In the <tfoot> tag is used to group content footer place.in the one point,the html did not allow <td> tag inside of <thead> tag.

Syntax:

<table>
  <thead> ... </thead>
</table>

Example Code

<table>
<tfoot>
  <tr>
    <td>Baja</td>
    <td>96000237</td>
  </tr>
</tfoot>
<thead>
  <tr>
    <th>Car Name</th>
    <th>Price</th>
  </tr>
  </thead>
</table>

Out Put:



Baja 96000237
Car Name Price

In the above example first define <tfoot> tag and second define <thead> tag but in the out put first is displaying header part and second is displaying footer part.





Content