HTML <th> 범위 속성
예시
두 머리글 셀이 열 머리글임을 지정합니다.
<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>
정의 및 사용
속성 은 scope
머리글 셀이 열, 행 또는 열이나 행 그룹의 머리글인지 여부를 지정합니다.
참고: 속성 scope
은 일반 웹 브라우저에서 시각적 효과가 없지만 화면 판독기에서는 사용할 수 있습니다.
브라우저 지원
Attribute | |||||
---|---|---|---|---|---|
scope | Yes | Yes | Yes | Yes | Yes |
통사론
<th scope="col|row|colgroup|rowgroup">
속성 값
Value | Description |
---|---|
col | Specifies that the cell is a header for a column |
row | Specifies that the cell is a header for a row |
colgroup | Specifies that the cell is a header for a group of columns |
rowgroup | Specifies that the cell is a header for a group of rows |
❮ HTML <th> 태그