col

Support

Specifies property defaults for a column in a table.

The col tag is used to specify column dependent attributes for a table. You can use it together with the colgroup element, overriding the attributes of the colgroup for the specific column.

This element must be placed within a table element.

Note that Firefox, Google Chrome, Safari and Opera have only partial support for this element.

Example

<table border="1px">
<col style="background-color: #a0f0a0;" />
<col span="2" style="background-color: #a0a0f0;" />
<tbody>
<tr>
<td>Apple</td>
<td>$5</td>
<td>$10.7</td>
</tr>
<tr>
<td>Pear</td>
<td>$10.50</td>
<td>$8.20</td>
</tr>
<tr>
<td>Peach</td>
<td>$23.30</td>
<td>$19.45</td>
</tr>
</tbody>
</table>

Preview

Apple $5 $10.7
Pear $10.50 $8.20
Peach $23.30 $19.45