HTML <table> cellspacing attribute
HTML <table> tag
Example
The following example sets the space between the cells to ten
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 yourself!
|
Definition and Usage
The cellspacing attribute specifies the space between cells.
Note: Do not confuse this with the
cellpadding attribute, which
specifies the space between the cell wall and the cell content.
Browser Support

The cellspacing attribute is supported in all major browsers.
Syntax
<table cellspacing="value">
|
Attribute Values
Value |
Description |
pixels |
The space between cells |
HTML <table> tag
 |
|
Get Your Diploma!
W3Schools' Online Certification Program is the perfect solution for busy
professionals who need to balance work, family, and career building.
The HTML Certificate is for developers who want to document their knowledge of HTML, XHTML, and CSS.
The JavaScript Certificate is for developers who want to document their knowledge of JavaScript and the HTML DOM.
The XML Certificate is for developers who want to document their knowledge of XML, XML DOM and XSLT.
The ASP Certificate is for developers who want to document their knowledge of ASP, SQL, and ADO.
The PHP Certificate is for developers who want to document their knowledge of PHP and SQL (MySQL).
|
|