HTML <td>ヘッダー属性

❮HTML<td>タグ

各<td>要素が関連する<th>要素を指定します。

<table>
  <tr>
    <th id="name">Name</th>
    <th id="email">Email</th>
    <th id="phone">Phone</th>
    <th id="addr">Address</th>
  </tr>
  <tr>
    <td headers="name">John Doe</td>
    <td headers="email">[email protected]</td>
    <td headers="phone">+45342323</td>
    <td headers="addr">Rosevn 56,4300 Sandnes,Norway</td>
  </tr>
</table>

定義と使用法

このheaders属性は、テーブルセルが関連する1つ以上のヘッダーセルを指定します。

注:このheaders属性は、通常のWebブラウザーでは視覚効果はありませんが、スクリーンリーダーで使用できます。 


ブラウザのサポート

Attribute
headers Yes Yes Yes Yes Yes

構文

<td headers="header_id">

属性値

Value Description
header_id Specifies a space-separated list of id's to one or more header cells the table cell is related to

❮HTML<td>タグ