HTML colgroup span Attribute
HTML <colgroup> tag
Definition and Usage
The span attribute specifies the number of columns the colgroup element should
span.
This attribute should not be confused with the colspan attribute. This
attribute does not merge any cells.
Syntax
<colgroup span="columns" />
|
Syntax Example
Attribute Values
Value |
Description |
columns |
Specifies the number of columns the colgroup element
covers. |
Browser Support

The attribute is supported in all major browsers.
Note: Even though this attribute has strong support in all browsers,
most of the other colgroup attributes has poor support.
Example
Source |
Output |
<table border="1">
<colgroup span="2" width="40px" />
<colgroup width="100px" />
<tr>
<th colspan="3">This table contains
three table data cells</th>
</tr>
<tr>
<td>Peter</td>
<td>Glenn</td>
<td>Cleveland</td>
</tr>
</table>
|
This table contains
three table data cells |
Peter |
Glenn |
Cleveland |
|
Try-It-Yourself Demos
colgroup
span attribute example
Set the span of the column group.
HTML <colgroup> tag
 |

|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|