Month "> Month " />
Easy Tutorial
❮ Ev Onshow Ref Standardattributes ❯

HTML <table> cellspacing Attribute

HTML <table> 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>

Browser Support

All major browsers support the cellspacing attribute.


Definition and Usage

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

Note: Do not confuse this attribute with the cellpadding attribute, which specifies the space between the cell borders and the cell content.


Syntax

Attribute Values

Value Description
pixels Specifies the space between cells.

❮ Ev Onshow Ref Standardattributes ❯