col 태그는 table태그의 colgroup태그의 하위 태그로 열의 속성을 지정한다.
<table>
<caption>매출현황</caption>
<colgroup>
<col style="background-color: chartreuse">
<col span="4" style="background-color: aquamarine">
<col style="background-color: coral">
</colgroup>
<tr style="background-color: cadetblue">
<th>지역</th>
<th>1분기</th>
<th>2분기</th>
<th>3분기</th>
<th>4분기</th>
<th>합계</th>
</tr>
<tr>
<td>서울</td>
<td>1,800</td>
<td>2,300</td>
<td>1,700</td>
<td>2,600</td>
<td>7,400</td>
</tr>
<tr>
<td>부산</td>
<td>2,600</td>
<td>2,800</td>
<td>3,200</td>
<td>2,800</td>
<td>11,400</td>
</tr>
</table>
Attribute | Value | Description |
---|---|---|
span | number | 합칠 열의 수 설정 |
반응형
'HTML' 카테고리의 다른 글
data 태그 (0) | 2021.01.12 |
---|---|
colgroup 태그 (0) | 2021.01.12 |
code 태그 (0) | 2021.01.10 |
cite 태그 (0) | 2021.01.08 |
caption 태그 (0) | 2021.01.08 |