HTML <colgroup> 스팬 속성
예시
<colgroup> span 속성을 사용하여 처음 두 열의 배경색을 설정합니다.
<table>
<colgroup span="2" style="background:red"></colgroup>
<tr>
<th>ISBN</th>
<th>Title</th>
<th>Price</th>
</tr>
<tr>
<td>3476896</td>
<td>My first HTML</td>
<td>$53</td>
</tr>
<tr>
<td>5869207</td>
<td>My first CSS</td>
<td>$49</td>
</tr>
</table>
정의 및 사용
속성 은 요소가 확장되어야
span
하는 열의 수를 정의합니다 .
<colgroup>
팁: 내에서 열에 다른 속성을 정의하려면 태그 내에서 태그
<colgroup>
를 사용하십시오 .<col>
<colgroup>
브라우저 지원
Attribute | |||||
---|---|---|---|---|---|
span | Yes | Yes | Yes | Yes | Yes |
통사론
<colgroup span="number">
속성 값
Value | Description |
---|---|
number | Sets the number of columns a column group should span |
❮ HTML <colgroup> 태그