HTML / HTML Tags

HTML <Thead> Tag

Dec 12, 2022
1 min read
HTML thead Tag

Definition

A <thead> tag is used to define a group of header-related table rows.

Example

<table>
  <caption>This is the table's caption</caption>
    <thead>
        <tr>
            <th colspan="2">The table header with one column</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>The table body</td>
            <td>with two columns</td>
        </tr>
    </tbody>
</table>

Usage

  • The opening tag is required.
  • The closing tag can be omitted if the <thead> is immediately followed by a <tbody> or a <tfoot> element.
  • This <thead> can be placed as a child of a <table> element after any <caption> and <colgroup> elements, and before any <tbody>, <tfoot>, and <tr> elements. Only one <thead> element is permitted in a <table> element.
  • The <thead> may contain zero or more <tr> elements.

Attributes

The <thead> element only supports the Global Attributes.

Specification

Browser Support

Desktop

ChromeEdgeFirefoxIEOperaSafari
YesYesYesYesYesYes

Mobile

Android WebviewChrome AndroidFirefox AndroidOpera AndroidiOS SafariSamsung Internet
YesYesYesYesYesYes