HTML / Element / Initial coverage

<thead>要素

状態: 初期Coverage 対象: HTML Living Standard 仕様確認日: 2026-10-17

Technical Summary

theadは、親のtableに属する列見出しと関連する補助cellの行グループを表します。直接のtable childとして0個または1個を置き、captionとcolgroupの後、table body・tfoot・table直下のtrより前に配置します。

theadはrow groupであり、見出しcellを表すthとは別の構造です。HTML-AAMはnative theadをrowgroup roleへ対応付けます。各cellの見出しroleやdata/header relationshipはth、td、scope、headersを含む別の規則で評価します。

定義・配置・content model

thead要素の基本定義
項目仕様上の定義条件・範囲
意味列見出しと補助cellを含むrow groupcell自体のheader/data semanticsとは区別する
配置先tableの子captionとcolgroupの後。table body、tfoot、table直下のtrより前。直接の子は最大1個
content model0個以上のtrとscript-supporting elements各行のcellはtdまたはthを含められる
開始タグ・終了タグ開始タグは必須直後がtbodyまたはtfootなら終了タグを省略できる
DOM interfaceHTMLTableSectionElementtbody・tfootと共有する
固有属性定義なしglobal attributesを利用できる

HTMLの適合性とparser recoveryは分けて扱います。parserが不正な入力からDOMを作れたことは、その入力が適合するHTMLであることを意味しません。

thead、th、table model

table内で異なる意味を持つ要素
要素構造上の役割cell semantics
thead見出し部分の行グループsectionだけでは各cellを見出しcellにしない
throw内のcellheader cell。scopeやheader-assignment algorithmが適用関係を決める
tbody表本体の行グループ中のthはrow headerなどとして使える
tdrow内のcelldata cell

HTML Standardのthead定義は、列見出しの行に加えて補助的なnon-header cellを含む場合を認めます。したがって、行の所属先だけで見出し関係を推定せず、実際のcell要素とtable modelを確認します。

複雑な表では、thのscope、id、headers、row/column groupおよびcell spanが関係します。theadというsection名だけで全cellの関連先や読み上げ順を決めることはできません。

parserが作るDOM

<table id="schedule">
  <tr><th scope="col">曜日</th></tr>
</table>

// HTML parserが構築するDOM
table#schedule
└─ tbody  (暗黙に挿入)
   └─ tr
      └─ th

table insertion modeで、table childとして適合するsectionの外にtr tokenが現れると、tree builderはtbodyを暗黙に挿入してtokenを再処理します。cellがthであることを理由にtheadは推定されません。適合するauthoring markupでは、見出し行の親としてtheadを明示します。

HTMLTableSectionElementとtable API

theadから使う主なAPI
member戻り値・動作範囲・境界
table.tHead最初の直接子theadを返す該当要素がなければnull
table.createTHead()既存の最初のthead、または新しいsectionを返す新規作成時はcaption・colgroupの後へ挿入する
table.deleteTHead()最初の直接子theadを削除する存在しない場合は何もしない
thead.rowssection直下のtrを含むHTMLCollection行の追加・削除を反映するlive collection
thead.insertRow() / deleteRow()section内の行を追加・削除するindexはsection内の行に対して解釈する
const table = document.querySelector("table");
const head = table.tHead;           // 既存のthead。なければnull
const sameHead = table.createTHead(); // あれば同じ要素を返す
head.rows.length;                   // thead内のtrの数

table.rowsはtable全体の行collection、thead.rowsはheader sectionの行collectionです。似た名前でも、対象範囲が異なります。createTHead()はsectionを作るAPIであり、thや行の内容までは作りません。

Accessibility mapping

HTML-AAMはnative theadをWAI-ARIAのrowgroup roleへ対応付けます。これはheader row groupの構造を示し、列見出しcellのroleを代わりに与えるものではありません。header cellはthと、そのscopeやtable header-assignment規則を基に区別します。

本ページのAAM実測はChromeのbrowser role/name queryです。これはHTML-AAMの規範的mappingそのものでも、Windows UI Automationなどplatform APIの記録でも、支援技術の読み上げ観測でもありません。

Fact / Evidence(主張 / 根拠)

規範的な仕様上の主張、AAMのmapping、選定環境における実装結果を別々に記録します。

theadの主要Factと根拠位置
種別Fact / 主張条件・範囲状態根拠
SPECtheadはtable childとして最大1つ置け、caption・colgroupの後、tbody・tfoot・table直下のtrより前に置く。content modelはtrとscript-supporting elements。要素定義、順序、tag omission、HTMLTableSectionElement interfaceを含む。仕様確認済みHTML Standard: the thead element
SPECtable直下のtr tokenをtable insertion modeで処理する際、parserはtbodyを挿入する。thを含む行であってもtheadを推定しない。HTML parserの構築・recoveryと、authoring conformanceを区別する。仕様確認済みHTML Standard: in table insertion mode
SPECHTML-AAMはnative theadをrowgroup roleへ対応付ける。規範的mappingとbrowser Accessibility tree、platform API、assistive technology出力を区別する。仕様確認済みHTML-AAM: thead

Evidence

  1. HTML Standard: The thead element — context, content model, tag omission, and section interface
  2. HTML Standard: The table element — table child structure and table APIs
  3. HTML Standard: The “in table” insertion mode — implied tbody insertion and token reprocessing
  4. HTML Accessibility API Mappings: thead — rowgroup mapping
  5. Web Platform Tests: the-thead-element/rows.html — section row collection
  6. Web Platform Tests: the-table-element/tHead.html — table.tHead behavior

Implementation Evidence

仕様上の要求、選定環境のbrowser観測、WPT実行、Accessibility role/name queryを分けて記録します。各結果は記載したfixture・browser・test範囲に限られます。

theadのImplementation Evidence register
種別再現確認の範囲記録条件状態
IMPL HTMLTableSectionElement、table.tHead、createTHead() / deleteTHead()、thead.rows / insertRow() / deleteRow()、table parserの直接tr処理と終了tag省略 2026-10-17 JST / Chrome UA 155.0.0.0(Windows NT 10.0 UA)/ viewport 1920×911 / navigator.language=en-US。build-config/yugien/research-results/thead-v1/をloopback 127.0.0.1:4198で表示し、fixture checks 14/14 pass。section interface、table.tHead、既存headでのcreateTHead()、挿入位置、行collection、row API、parserが直接trにtbodyを補う挙動、許可された終了tag省略を確認。Chrome 1環境のみ。別browser、OS build、platform APIは未測定。 部分観測(Chrome 155 / fixture 14/14)
WPT thead.rowsとtable.tHead / section APIに関する選定WPT 2026-10-17 JST / Chrome UA 155.0.0.0 / wpt.live。rows.html 1/1 pass、tHead.html 3/3 pass。合計4/4 pass。wpt.liveが配信した正確な上流revisionは固定できていない。選定外test、他browserは未実施。

実測時のテスト版は未記録です。リンク先の内容は変わることがあり、当時と同じテストで再確認できるとは限りません。

選定test 4/4成功(wpt.liveの版は未固定)
AAM Chrome browser role/name queryによるnative table、row group、row、column header、row header、data cellの公開 2026-10-17 JST / Chrome UA 155.0.0.0(Windows NT 10.0 UA)/ viewport 1920×911 / navigator.language=en-US。fixtureのnamed table Quarterly revenueをqueryし、table 1、rowgroup 3(thead、tbody、tfoot)、row 4、columnheader 2、rowheader 2、cell 3を確認。browser role queryによる観測であり、Windows UI Automationなどのplatform APIとスクリーンリーダー発話は未測定。 部分観測(Chrome 155 browser role query / 1環境)

Coverage / Open Issues

  • SPEC要素の意味、配置条件、content model、tag omission、DOM interface、table parser、table API、HTML-AAM role mappingを確認
  • IMPLfixtureとChrome 1環境に限定。別browser・OS build・印刷時のheader group behaviorは未測定
  • WPT選定testのみ実行。wpt.liveが配信した上流revisionは未固定で、他browserとdirectory全体は未確認
  • AAMbrowser role/name queryを測定。platform Accessibility API、実際の支援技術の読み上げ、他環境の比較は未実施
  • ReviewExpert-gap Reviewは未実施

このTopicは初期Coverageです。選定fixtureとtestの成功は、すべてのHTML構造、browser、OS、支援技術で同じ結果になることを示しません。

関連Surface

列グループの仕様と実測結果はcolgroup Topic、初心者向けの例はYugienのcolgroup要素ページで扱います。

初心者向けの例はYugienのthead要素ページを参照してください。表全体の構造はtable Topic、見出しcellとcell associationはth Topic、表本体の行グループはtbody Topic、summary row groupはtfoot Topic、row structureはtr Topicで扱います。