Instead of applying a class to every td in my table, I am using colgroup, however only background-color seems to work on colgroup. When I apply color or any font styles, the colgroup ignores it.
col.col1 {
font-size:0.8em;
color:#ff0000;
background-color:#aaaaaa;
}
<table>
<colgroup>
<col class=“col1” />
<col class=“col2” />
</colgroup>
<tr><td>item</td><td>dat1</td></tr>
<tr><td>item</td><td>dat1</td></tr>
</table>
the first column shows the grey background color(#aaaaaa) but ignores the font styles(color and size). is there a way to style the fonts of my table columns without assigning a class to each and every table cell. I thought colgroup would be my magical solution but it only seems to want to take background color.