SPAN Attribute | span Property

MS Office 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 propertiesInternet Link.

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:
Version data is listed when the mouse hovers over a link, or the link has focus.

COL, COLGROUP


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.