Easy Tutorial
❮ Att Optgroup Label Canvas Textbaseline ❯

HTML <colgroup> span Attribute

HTML <colgroup> Tag

Example

Use the <colgroup> span attribute to set the background color for the first two columns:


Browser Support

All major browsers support the span attribute.


Definition and Usage

The span attribute defines the number of columns a <colgroup> element should span.

Tip: To define different attributes for columns within a <colgroup>, use the <col> tag inside the <colgroup> tag.


Differences Between HTML 4.01 and HTML5

None.


Syntax

Attribute Values

Value Description
number Sets the number of columns the column group should span.

❮ Att Optgroup Label Canvas Textbaseline ❯