Click to return to the DHTML, HTML     
sourceIndex Property     specified Property     DHTML Properties    
Web Workshop  |  DHTML, HTML & CSS

SPAN Attribute | span Property


Sets or retrieves the number of columns in the group.

Syntax

HTML<ELEMENT SPAN = iSpan ... >
Scriptingobject.span [ = iSpan ]

Possible Values

iSpanInteger 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>

This feature requires Internet Explorer 4.0 or later. Click the icon below to install the latest version. Then reload this page to view the sample.
Microsoft Internet Explorer

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:

COL, COLGROUP



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.