강의명 : html
- HTML <col> 태그
<col> 태그는 <colgroup> 요소에 속하는 각 열(column)의 속성을 정의할 때 사용합니다.
<col> 요소는 각 행(row)이나 셀(cell)의 스타일을 반복하지 않고, 열(column)마다 각각 다른 스타일을 적용하고 싶을 때 유용하게 사용할 수 있습니다.
<col> 요소는 각 행(row)이나 셀(cell)의 스타일을 반복하지 않고, 열(column)마다 각각 다른 스타일을 적용하고 싶을 때 유용하게 사용할 수 있습니다.
예제
<table>
<colgroup>
<col style="background-color: lightgreen">
<col span="2" style="background-color: yellow">
</colgroup>
<tr>
<th>학번</th>
<th>이름</th>
<th>학과</th>
</tr>
<tr>
<td>2006123456</td>
<td>홍길동</td>
<td>전자공학과</td>
</tr>
</table>
<colgroup>
<col style="background-color: lightgreen">
<col span="2" style="background-color: yellow">
</colgroup>
<tr>
<th>학번</th>
<th>이름</th>
<th>학과</th>
</tr>
<tr>
<td>2006123456</td>
<td>홍길동</td>
<td>전자공학과</td>
</tr>
</table>
댓글목록
등록된 댓글이 없습니다.