HTML col tag

The HTML <col> tag is used for specifying column properties for each column within a <colgroup> element.

The <col> tag can be handy if you need to specify styles across one or more columns. Rather than apply the styles at the individual <td> level, you can apply it to the <col> element. Then all <td> (and <th>) elements contained within that <col> will be styled accordingly.

<table border="1">
<colgroup>
<col style="background:#AEF642;">
<col span="3" style="background:#F4FBEA;">
<col style="background:orange;">
</colgroup>
<tr>
<th>Header 1</th>
<th>Header 2</th>
<th>Header 3</th>
<th>Header 4</th>
<th>Header 5</th>
</tr>
<tr>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
</tr>
<tr>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
</tr>
</table>

Eg. :

Header 1Header 2Header 3Header 4Header 5
CellCellCellCellCell
CellCellCellCellCell