<table border="1" width="400px" height="200px">
<caption>完整table</caption> //标题
<thead>
<tr>
<th>头</th>
<th>部</th>
</tr>
</thead>
<tbody>
<tr>
<td>身</td>
<td>体</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="2">底部</td> //横向合并
</tr>
</tfoot>
</table>
css样式:
width height–仅table和td使用
align水平对齐–table+tr+td
valign垂直对齐–tr+td
cellpadding cellspacing内外边距–table
细线表格:
table{ background-color: black; }
tr{ background-color: white; }
另外table加上cellspacing=“1”
若指定了thead和tfoot,则其有默认高度 不随table设置高度改变
rowspan和colspan只是向下和向后合并