By using <col>
tag we can specify the column properties of table, each column with in a colgroup in HTML5. <col> tag is used only when the values of each column are different.
<style> .colClass { background-color:red; font-size:x-large; } </style> <body> <table> <colgroup> <col /> <col class="colClass" /> </colgroup> <tr> <td>1</td> <td style="color:yellow;background-color:green;">2</td> </tr> <tr> <td>2</td> <td>3</td> </tr> <tr> <td>3</td> <td>4</td> </tr> </table> </body>