Sets or retrieves the number of columns in the group.
Syntax
HTML <ELEMENT SPAN = iSpan ... > Scripting object.span [ = iSpan ]
Possible Values
iSpan Integer that specifies the number of spanned columns. The property is read/write with a default value of 1.
Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see Dynamic Properties.
Remarks
The span property is ignored when set on the COLGROUP element and COLGROUP contains one or more COL elements. The span property provides a more convenient way of grouping columns without having to specify COL objects.
Example
This example uses the SPAN attribute to set the COL object to SPAN=2, which causes the COL to span two columns. The text is right-aligned in these two columns.
Sample Code
<TABLE BORDER> <COLGROUP> <COL SPAN=2 ALIGN=RIGHT> <COL ALIGN=LEFT> <TBODY> <TR> <TD>This is the first column in the group, and it is right-aligned.</TD> <TD>This is the second column in the group, and it is right-aligned.</TD> <TD>This is the third column in the group, and it is left-aligned.</TD> </TR> </TABLE>
Applies To