HTML COL 범위 속성
예
여기서, 적색으로 첫 번째 두 열의 배경색 :
<table border="1">
<colgroup>
<col span="2" style="background-color:red" />
<col style="background-color:yellow" />
</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>
</table>
<colgroup>
<col span="2" style="background-color:red" />
<col style="background-color:yellow" />
</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>
</table>
»시도
브라우저 지원
모든 주요 브라우저는 범위 속성을 지원합니다.
정의 및 사용
스팬 속성은 COL 요소 스팬한다 열의 수를 지정한다.
HTML 4.01과 HTML5의 차이점
없음.
문법
<col span="number">
속성 값
值 | 描述 |
---|---|
number | 设置 col 元素应该横跨的列数。 |
HTML <COL> 태그