HTML thead tag

HTML <thead> tag defines the heading section of the table. It contains the title (headings) of columns.

Example

Month Expenses
June $80000
July $70000
August $40000
September $26000
Total 254000
Try </>

The red background-color of thead distinguishes it from tbody and tfoot sections.

You can see the headings of columns have been given in the thead element.

Related tags

TagsDescription
<table> table tag represents data in a table in the form of rows and columns.
<table> <tr> table row is present here </tr> </table>
<tbody> tbody tag defines body section of the table.
<table> <tbody><td> cell data of body section <td></tbody> </table>
<tfoot> tfoot tag defines footer section of the table.
<table> <tfoot><td> cell data of footer section <td></tfoot> </table>

Tag omission

Both tags may be omitted.

Global Attributes

All the global attributes are applicable on the thead element.



Was this article helpful?

 

Email:

Message:

Get the newsletter