HTML <thead> tag

HTML <thead> tag

The <thead> tag specifies a header content in an HTML table.

Note: The <thead> element is optional and can be used in conjunction with the <tbody> and <tfoot> elements.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <table> <thead> <tr> <th>Students</th> <th>Count</th> </tr> </thead> <tbody> <tr> <td>Male</td> <td>28</td> </tr> <tr> <td>Female</td> <td>30</td> </tr> </tbody> <tfoot> <tr> <td>Total</td> <td>58</td> </tr> </tfoot> </table> </body> </html>

Attributes

There is no special attributes for <thead> tag. Only Global attributes.

Deprecated Attributes

The following attribute should not be used in any case.

AttributeValueExplanation
align
  • left
  • center
  • right
  • justify
  • char
Specifies the horizontal alignment of the <thead> section.
bgcolor
  • color name
  • #RRGGBB
Specifies the background color of the <thead> section.
charcharacterSpecifies a character to align the content inside <thead> element.
charoffnumberSpecifies the number of characters to offset the <thead> data from the alignment characters specified by the char attribute.
valign
  • baseline
  • bottom
  • middle
  • top
Specifies the vertical alignment of the <thead> content.

Reminder

Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in HTML.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Meet the Author