thead 要素

4.9.6 thead 要素

カテゴリー
なし
この要素を使うことができるコンテキスト:
table 要素の子として。ただし、caption 要素と colgroup 要素の後に位置し、かつ、tbody, tfoot, tr 要素の前に位置し、table 要素の子となる thead 要素が他にない場合に限ります。
コンテンツ・モデル:
0 個以上の tr 要素
コンテンツ属性:
グローバル属性
DOMインタフェース:
HTMLTableSectionElement です。tbody 要素のものと同じです。

thead 要素は、親を持ち、それが table 要素であれば、その親の table 要素に対するカラム・ラベル(ヘッダー)から構成されるブロック表します。

thead 要素は、テーブル・モデルに属します。

この例は、thead 要素の利用例を示しています。thead 要素の中の thtd 要素のいずれも使われている点に注目してください。最初の行はヘッダーです。次の行は、このテーブルに何が入るのかについての説明です。

<table>
 <caption> School auction sign-up sheet </caption>
 <thead>
  <tr>
   <th><label for=e1>Name</label>
   <th><label for=e2>Product</label>
   <th><label for=e3>Picture</label>
   <th><label for=e4>Price</label>
  <tr>
   <td>Your name here
   <td>What are you selling?
   <td>Link to a picture
   <td>Your reserve price
 <tbody>
  <tr>
   <td>Ms Danus
   <td>Doughnuts
   <td><img src="http://example.com/mydoughnuts.png" title="Doughnuts from Ms Danus">
   <td>$45
  <tr>
   <td><input id=e1 type=text name=who required form=f>
   <td><input id=e2 type=text name=what required form=f>
   <td><input id=e3 type=url name=pic form=f>
   <td><input id=e4 type=number step=0.01 min=0 value=0 required form=f>
</table>
<form id=f action="/auction.cgi">
 <input type=button name=add value="Submit">
</form>

※ 原文:http://www.w3.org/TR/2011/WD-html5-20110525/tabular-data.html#the-thead-element