thead

< html‎ | elements
Jump to: navigation, search

thead

This article is Ready to Use.

W3C Recommendation

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.

HTML

<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

Specification Status Related Changes
HTML 5.1 W3C Working Draft
HTML 5 W3C Recommendation
HTML 4.01 W3C Recommendation

Attribution

This article contains content originally from external sources.

Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]