Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML table cellspacing attribute

HTML

HTML table Tag Reference HTML

The cellspacing attribute
tag

Example

Set the spacing between table cells to 10 pixels:

<

table

border

=

"

1

"

cellspacing

=

"

10

"

<

tr

<

th

Month

th

<

th

Savings

th

tr

<

tr

<

td

January

td

<

td

$100

td

tr

table

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the cellspacing attribute.


Definition and Usage

HTML5 does not support

The cellspacing attribute specifies the space between cells, in pixels. If this attribute is not set, its default value is cellspacing="2".

**Note:** Do not confuse this attribute with cellpadding attribute; the cellpadding attribute specifies the space between the cell edges and the cell content.


Syntax

The cellspacing attribute.
HTML

tag