HTML <th> rowspan 속성
예시
3개의 행에 걸쳐 있는 헤더 셀이 있는 HTML 테이블:
<table>
<tr>
<th>Month</th>
<th>Savings</th>
<th rowspan="3">Savings for holiday!</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</table>
아래에서 더 많은 "직접 사용해 보기" 예를 살펴보세요.
정의 및 사용
속성 은 rowspan
헤더 셀이 확장되어야 하는 행 수를 정의합니다.
브라우저 지원
Attribute | |||||
---|---|---|---|---|---|
rowspan | Yes | Yes | Yes | Yes | Yes |
통사론
<th rowspan="number">
속성 값
Value | Description |
---|---|
number | Sets the number of rows a header cell should span. Note: rowspan="0" tells the browser to span the cell to the last row of the table section (thead, tbody, or tfoot) |
더 많은 예
예시
rowspan="0" 사용(Chrome, Firefox 및 Opera에서 작동):
<table>
<thead>
<tr>
<th>Month</th>
<th>Savings</th>
<th rowspan="3">Savings for holiday!</th>
</tr>
</thead>
<tbody>
<tr>
<td>January</td>
<td>$100</td>
<td rowspan="0">$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</tbody>
</table>
❮ HTML <th> 태그