<thead> tag

HTML <thead> tag

The <thead> tag groups the header content in the table.

You should code the <thead>  tag inside the <table> tag.

Syntax:
<thead>text…</thead>

Example

<table>
 <thead>
  <tr>
    <th>Animals</th>
    <th>Birds</th>
  </tr>
  </thead>
  <tr>
    <td>Lion</td>
    <td>Parrot</td>
  </tr>
  <tr>
    <td>Tiger</td>
    <td>Sparrow</td>
  </tr>
</table>

Difference between HTML4.01, XHTML and HTML5

HTML4 XHTML HTML5
No difference No difference All the attributes of the <thead> tag are not supported in HTML5

Attributes used with <thead> tag

Attribute Description
align Describes the alignment of the content inside the <thead> cell based on nearby elements. The alinment can be left, right, justify, center, or char,
(HTML5 does not support this attribute when it is used with the <thead> tag).
char Sets as character valuue for the content alignment of the <thead> cell.
(HTML5 does not support this attribute when it is used with the <thead> tag).
valign It aligns the content inside the <tbody> tag as vertically alignment.
(HTML5 does not support this attribute when it is used with the <thead> tag).

Global Attributes

The <thead> tag supports Global attributes.

Event Attributes

The <thead> tag supports Event attributes.

Supporting Browsers

supporting-browsers for tags

Default CSS value

display: table-header-group;
vertical-align: middle;
border-color: inherit;

Related Tags

<table><tr><td><th>, <caption>, <tbody><tfoot><colgroup><col> tags.

Tutorials for all brains!