Latest web development tutorials

Columngroup span properties

Columngroup Object Reference Columngroup objects

Examples

Back <colgroup> element number of columns spanned:

var x = document.getElementById ( "myColgroup") span.;

x The output is:

2

try it"

Definitions and use

span property sets or returns the property value column group span.

The number of columns span attribute definition <colgroup> element crossings.

Tip: Different column elements Property Description <colgroup>, use the Column object.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support span property.


grammar

Returns span attributes:

columngroupObject .span

Setting formMethod properties:

columngroupObject .span = number

Property Value

value description
number Describes the number of columns spanned <colgroup> element.

Technical Description

return value: Returns the number of columns


More examples

Examples

Use span and backgroundColor property is set before the two background color to red:

document.getElementById("myColgroup").span="2";
document.getElementById("myColgroup").style.backgroundColor="red";

try it"


Related Pages

HTML Reference Manual: HTML <COLGROUP> span properties


Columngroup Object Reference Columngroup objects