References

Collection of references for web development.

HTML col tag

Description

The HTML <col> element specifies cell properties, usually appears in the <colgroup> element.

Attributes

Attribute Value Description
span number Specifies the number of columns the col elements spans.

Example

<table>
	<colgroup>
		<col span="2" style="background-color:orange;">
	</colgroup>
	<tr>
		<th>Name</th>
		<th>Age</th>
	</tr>
	<tr>
		<td>David Deacon</td>
		<td>28</td>
	</tr>
	<tr>
		<td>Barry Richards</td>
		<td>52</td>
	</tr>
</table>