HTML <table> cellspacing 属性
实例
把表格单元格间距设置为 10 像素:
  
    <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>
尝试一下 >>
浏览器支持





所有主流浏览器都支持 cellspacing 属性。
定义和用法
HTML5 不支持 <table> cellspacing 属性。
cellspacing 属性规定单元之间的空间,以像素计。
注意:请勿将该属性与 cellpadding 属性相混淆,cellpadding 属性规定的是单元边沿与单元内容之间的空间。
语法
  
    <table cellspacing="pixels">
属性值
| 值 | 描述 | 
|---|---|
| pixels | 规定单元之间的空间。 | 
 HTML <table> 标签
  HTML <table> 标签