Set the background color of the first two columns using the <colgroup> span attribute:
![]()
The span attribute is supported in all major browsers.
The span attribute defines the number of columns a <colgroup> element should span.
Tip: To define different properties to a column within a <colgroup>, use the <col> tag within the <colgroup> tag.
NONE.
| Value | Description |
|---|---|
| number | Sets the number of columns a column group should span |
HTML <colgroup> tag
Your message has been sent to W3Schools.