HTML col - how to use <col> tag

The HTML <col> - is used to define properties of columns defined within the <colgroup> tag. The <col> tag can be used to style to whole columns.

Attributes

The col tag supports the global and event attributes.

Examples:

<table> <colgroup> <col style="background-color:red"> <col style="background-color:blue"> <col style="background-color:yellow"> </colgroup> <tr> <th>Country</th> <th>Capital</th> <th>City</th> </tr> <tr> <td>USA</td> <td>Washington</td> <td>New York</td> </tr> <tr> <td>India</td> <td>New Delhi</td> <td>Chennai</td> </tr> </table>