all
alt
ch
dir
id
min
rel
top
url
URL
urn
Expand Minimize

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.

Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/span.htm


<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:
© 2014 Microsoft