This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

thead

Summary

The thead element (<thead>) identifies header rows at the top of a table, usually containing column labels. It may contain one or more rows of <th> or <td> cells.


Overview Table

DOM Interface
HTMLTableSectionElement

Examples

The following code example uses the thead' element and the table, tbody, td, and tr elements to create a table that includes the first row in the table header and the second row in the table body.

<table>
<thead>
  <tr>
    <th scope="col">Player</th>
    <th scope="col">Position</th>
  </tr>
</thead>
<tbody>
  <tr>
    <td>James, Lebron</td>
    <td>SF</td>
  </tr>
  <tr>
    <td>Wade, Dwayne</td>
    <td>SG</td>
  </tr>
  <tr>
    <td>Bosh, Chris</td>
    <td>PF</td>
  </tr>
</tbody>
</table>


Notes

Remarks

Valid tags within the THEAD element include:

  • td * chances are should be a th not a td, and scope of column
  • th
  • tr

You can specify only one thead object specified for any given table object. The table object and its associated elements have a separate table object model, which uses different methods than the general object model.

Standards information


Related specifications

HTML 5.1
W3C Working Draft
HTML 5
W3C Recommendation
HTML 4.01
W3C Recommendation

Attributions