thead 表格的头部,里面一般th
tbody 表格的主题内容,里面是用td
tfoot 表格的底部, 一般是th
thead,tbody,tfoot是一套,不能单独用某一个,三个部分之间的单元格不能互相合并。
th 是表头的一个单元格,字体有加粗的效果。
caption 是表格的标题
属性:
align 表格的位置 left左边,center居中,right 居右
bgcolor 网页的背景色,颜色值可以是rgb(255,255,22),十六进制的颜色代码#xxxx,颜色的英文单词
rowspan 合并跨行单元格,合并以后,后面被合并的要删除
colspan 合并同行单元格,合并以后,后面被合并的要删除
<table align="center" border="1" cellspacing="0" width="500" height="500">
<thead>
<tr>
<th>
1
</th>
<th>
2
</th>
<th>
3
</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="2">1</td>
<td rowspan="2">3</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
</tr>
</tbody>
<tfoot>
<tr>
<th>
1
</th>
<th>
2
</th>
<th>
3
</th>
</tr>
</tfoot>
</table>