cellspacing attribute | cellSpacing property

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.
1 out of 2 rated this helpful - Rate this topic

Sets or retrieves the amount of space between cells in a table.

HTML 4.01 Specification, Section 11.3.3

Syntax

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

p = object.cellSpacing

Property values

Type: Variant

spacing

Integer that specifies the amount of space between cells, in pixels.

percentage

Integer, followed by a %. The value is a percentage of the available amount of space between the border and the content.

Standards information

Examples

This example uses the cellspacing attribute and the cellSpacing property to change the spacing between two cells.

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


<table id=oTable border cellspacing="10">
    <tr>
        <td>Cell 1</td>
        <td>Cell 2</td>
    </tr>
</table>
:
<button onclick="oTable.cellSpacing=20">Larger spacing</button>
<button onclick="oTable.cellSpacing=5">Smaller spacing</button>


See also

table
cellPadding

 

 

Send comments about this topic to Microsoft

Build date: 11/28/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

© 2013 Microsoft. All rights reserved.