Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

span attribute | span property

Sets or retrieves the number of columns in the group.

Syntax

HTML<element span="p" ... >
JavaScript

p = object.span

 

Property values

Type: Integer

the number of spanned columns. The default value is 1.

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.

Examples

This example sets the span attribute of the col object to two, which causes the col to span two columns. The text is right-aligned in these two columns.


<table border="">
  <colgroup>
	   <col align="RIGHT" span="2">
    <col align="LEFT">
  </colgroup>
  <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>


See also

col
colGroup

 

 

Show:
© 2015 Microsoft