You are here: Reference > HTML > attributes > span (col, colgroup)

span attribute (col, colgroup)

Browser support:
Specifies the number of columns in a column group that share the settings defined in the col element.
The col and colGroup elements are useful if you want to use the same settings (align, class, style...) for all table cells in the current column.
JavaScript page for this attribute: span. You can find other example(s) there.

Possible values:

Integer that sets the numer of columns. Default: 1.
Default: 1.

Example HTML code 1:

This example illustrates the use of the span attribute:
<table border="1px">
    <col style="background-color: #a0f0a0;" />
    <col span="2" style="background-color: #a0a0f0;" />
Did you find this example helpful? yes no

Supported by tags:

External links:

User Contributed Comments

Post Content

Post Content