colgroup 태그는 사용되는 테이블의 컬럼(td 태그)에 적용할 스타일 width와 bakcground를 해당 태그에서 미리 적용할 수 있게 합니다.
특히 각 컬럼의 길이를 설정하는데 가장 많이 쓰입니다.
<table border="1">
<colgroup>
<col width="50px" style="background: red" />
<col width="200px" style="background: blue" />
<col width="100px" style="background: green" />
</colgroup>
<thead>
<tr>
<td>번호</td>
<td>제목</td>
<td>이름</td>
</tr>
</thead>
</table>
번호 | 제목 | 이름 |