CellSpacing 和CellPadding的区别
2015-03-13 14:40
197 查看
cellspacing表格单元格间距设置
cellpadding表格单元边沿与单元内容之间的间距设置
border设置表格边框大小
<html>
<body>
<p>Table with cellspacing and cellpadding:</p>
<table border="10"cellspacing="5" cellpadding="50">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>
<p>Table without others:</p>
<table border="1">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>
<p>Table with cellspacing:</p>
<table border="1"cellspacing="10">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>
<p>Table with cellpadding:</p>
<table border="1" cellpadding="10">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>
<p><b>Note:</b> The cellpadding attribute is not supported in HTML5. Use CSS instead.</p>
</body>
</html>
Table with cellspacing and cellpadding:
Table without others:
Table with cellspacing:
Table with cellpadding:
Note: The cellpadding attribute is not supported in HTML5. Use CSS instead.
cellpadding表格单元边沿与单元内容之间的间距设置
border设置表格边框大小
<html>
<body>
<p>Table with cellspacing and cellpadding:</p>
<table border="10"cellspacing="5" cellpadding="50">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>
<p>Table without others:</p>
<table border="1">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>
<p>Table with cellspacing:</p>
<table border="1"cellspacing="10">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>
<p>Table with cellpadding:</p>
<table border="1" cellpadding="10">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>
<p><b>Note:</b> The cellpadding attribute is not supported in HTML5. Use CSS instead.</p>
</body>
</html>
Table with cellspacing and cellpadding:
Month | Savings |
---|---|
January | $100 |
Month | Savings |
---|---|
January | $100 |
Month | Savings |
---|---|
January | $100 |
Month | Savings |
---|---|
January | $100 |
相关文章推荐
- cellpadding与cellspacing的区别
- cellpadding 和cellspacing区别
- HTML中cellpadding与cellspacing的区别解析
- table中cellspacing和cellpadding的区别
- cellspacing,cellpadding什么区别
- HTML cellpadding与cellspacing属性
- 表格(table)属性cellspacing、cellpadding
- IE6/7中使用setAttribute设置table的cellpadding和cellspacing的Bug
- cellpadding ,cellspacing的意思
- cellspacing与cellpadding
- table中cellspacing、cellpadding的css替代写法
- cellpadding与cellspacing
- table表格cellspacing与cellpadding属性
- 【用colspan,rowspan属性上下合并单元格,cellspacing,cellpadding设置间距】
- cellpadding和 cellspacing
- cellspacing和cellpadding
- 入门HTML之align 单元格间距cellspacing 单元格边距cellpadding
- CSS中表示cellpadding和cellspacing的方法
- cellpadding和 cellspacing
- html5中不再支持table的cellspacing和cellpadding属性