HTML <th> rowspan 속성

정의와 사용법

rowspan 제목 셀이 어떤 행을 건너뛰어야 하는지 정의하는 속성입니다。

예시

예제 1

跨越三行的标题单元格의 HTML 테이블을 포함합니다:

<table>
  <tr>
    <th>월</th>
    <th>예금</th>
    <th rowspan="3">휴가의 저축!</th>
  </tr>
  <tr>
    <td>1월</td>
    <td>¥3000</td>
  </tr>
  <tr>
    <td>2월</td>
    <td>¥4000</td>
  </tr>
</table>

직접 시험해 보세요

예제 2

rowspan="0"(크롬, 파이어폭스, 오페라에 적용됨):

<table>
<thead>
  <tr>
    <th>월</th>
    <th>예금</th>
    <th rowspan="3">휴가의 저축!</th>
  </tr>
</thead>
<tbody>
  <tr>
    <td>1월</td>
    <td>¥3000</td>
    <td rowspan="0">¥3500</td>
  </tr>
  <tr>
    <td>2월</td>
    <td>¥4000</td>
  </tr>
</tbody>
</table>

직접 시험해 보세요

문법

<th rowspan="number">

속성 값

설명
number

제목 셀이 경계하는 행 수를 설정합니다.

주의:rowspan="0"는 브라우저가 셀을 테이블 부분의 마지막 행(thead, tbody 또는 tfoot)으로 확장하도록 알립니다.

브라우저 지원

크롬 에지 파이어폭스 사파리 오페라
크롬 에지 파이어폭스 사파리 오페라
지원 지원 지원 지원 지원