HTML scope 属性

前へ 全ての HTML 属性 次へ

定義と用法

scope 属性は、ヘッダ・セルが、列、行、列のグループ、行のグループの何れのヘッダであるかを指定します。

scope 属性には、通常の web ブラウザでは視覚的な効果はありませんが、スクリーンリーダで使用することができます。


適用

scope 属性は、以下の要素で使用することができます:

要素 属性
<th> scope

2 つのヘッダ・セルは、列のヘッダであることを指定します:

<table>
  <tr>
    <th></th>
    <th scope="col">Month</th>
    <th scope="col">Savings</th>
  </tr>
  <tr>
    <td>1</td>
    <td>January</td>
    <td>$100</td>
  </tr>
  <tr>
    <td>2</td>
    <td>February</td>
    <td>$80</td>
  </tr>
</table>
Try it Yourself ❯

ブラウザ・サポート

属性
scope Yes Yes Yes Yes Yes

前へ 全ての HTML 属性 次へ