scope属性

縦、横どちらの方向に対する見出しであるかscope属性に値を入力して定義することができ、表の構造をより分かりやすく示すことができる。
auto:自動、文脈に基づいて判断(既定値)
row:行方向のセルを対象にする
col:列方向のセルを対象にする
rowgroup:行グループ内の全セルを対象にする
colgroup:列グループ内の全セルを対象にする

<table>

  <colgroup span="2"></colgroup>
  <colgroup span="2"></colgroup>

  <thead>
    <tr>
      <th colspan="2" scope="colgroup">グループA</th>
      <th colspan="2" scope="colgroup">グループB</th>
    </tr>
    <tr>
      <th scope="col">見出し1</th>
      <th scope="col">見出し2</th>
      <th scope="col">見出し3</th>
      <th scope="col">見出し4</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>データ1-1</td>
      <td>データ2-1</td>
      <td>データ3-1</td>
      <td>データ4-1</td>
    </tr>
    <tr>
      <td>データ1-2</td>
      <td>データ2-2</td>
      <td>データ3-2</td>
      <td>データ4-2</td>
    </tr>
  </tbody>

</table>
グループA グループB
見出し1 見出し2 見出し3 見出し4
データ1-1 データ2-1 データ3-1 データ4-1
データ1-2 データ2-2 データ3-2 データ4-2
inserted by FC2 system