HTML/Elements/thead

From W3C Wiki
< HTML‎ | Elements
Jump to: navigation, search

<thead>

The <thead> element represents the block of rows that consist of the column labels (headers) for the parent table element, if the thead element has a parent and it is a table.

Point

  • As a child of a table element, after any caption, and colgroup elements and before any tbody, tfoot, and tr elements, but only if there are no other thead elements that are children of the table element. [Example A]

HTML Attributes

See global attributes.


Examples

Example A

[try it]

<table>
  <caption>
    <p>table 1. List of HTML elements</p>
  </caption>
  <thead>
    <tr>
      <th>Number</th>
      <th>element</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>4.1.1</td>
      <td>html</td>
    </tr>
    <tr>
      <td>4.2.1</td>
      <td>head</td>
    </tr>
  </tbody>
</table>

Thead01.png

HTML Reference

The HTML5 specification defines the <thead> element in 4.9.6 The thead element.