EN
Данное содержимое не доступно на вашем языке, используйте версию на английском языке.

cellspacing attribute | cellSpacing property

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

 

 

Показ:
© 2014 Microsoft