References

Collection of references for web development.

HTML colgroup tag

Description

The HTML <colgroup> element specifies a group of columns within a table.

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>