HTML table cellspacing attribute
Examples
The table cell spacing 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>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>
try it"
Browser Support
All major browsers support cellspacing attribute.
Definition and Usage
HTML5 does not support the <table> cellspacing attribute.
Cellspacing attribute specifies the space between elements in pixels.
Note: Do not use this attribute cellpadding attribute confused, cellpadding attribute specifies that the space between cell edge and the cell content.
grammar
<table cellspacing="pixels">
Property Value
值 | 描述 |
---|---|
pixels | 规定单元之间的空间。 |
HTML <table> tag