HTML Dog

Skip to navigation

HTML Tag: col

Column. Specifies attributes to be applied to a table column. Commonly used to apply CSS to a column. Must be used within a colgroup element.

Required Attributes

Optional Attributes

Example


<table>
	<colgroup>
		<col class="column1" />
		<col class="column2" />
		<col class="columns3and4" span="2" />
	</colgroup>
	<tr>
		<th>lime</th>
		<th>lemon</th>
		<th>orange</th>
		<th>blood orange</th>
	</tr>
	<tr>
		<td>8</td>
		<td>7</td>
		<td>12</td>
		<td>5</td>
	</tr>
	...
</table>