html5,表格
Posted 侯伟东
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了html5,表格相关的知识,希望对你有一定的参考价值。
<table border="1">
<caption>表格的实例</caption>
<tr><td>单元格</td> <td>单元格</td> <td>单元格</td></tr>
<tr><td>单元格</td><td>单元格</td><td>单元格</td></tr>
<tr><td>单元格</td><td>单元格</td><td>单元格</td></tr>
</table>
<table border="1">
<thead style="background: red">
<tr><th colspan="5">aaaa</th></tr>
</thead>
<tbody style="background: red">
<tr><td>aaaa</td><td>aaaa</td><td>aaaa</td><td>aaaa</td><td>aaaa</td></tr>
<tr><td>aaaa</td><td>aaaa</td><td>aaaa</td><td>aaaa</td><td>aaaa</td></tr>
<tr><td>aaaa</td><td>aaaa</td><td>aaaa</td><td>aaaa</td><td>aaaa</td></tr>
</tbody>
<tfoot style="background: green">
<tr><th colspan="5">备注</th></tr>
</tfoot></table>
<table border="1">
<colgroup span="1" style="width: 150px">
<col style="background: red">
</colgroup>
<colgroup span="3" style="width: 200px">
<col style="background: green">
<col style="background: red">
<col style="background: green">
</colgroup>
<colgroup span="1" style="width: 350px"></colgroup>
<tr><td>aaaa</td><td>aaaa</td><td>aaaa</td><td>aaaa</td><td>aaaa</td></tr>
<tr><td>aaaa</td><td>aaaa</td><td>aaaa</td><td>aaaa</td><td>aaaa</td></tr>
<tr><td>aaaa</td><td>aaaa</td><td>aaaa</td><td>aaaa</td><td>aaaa</td></tr>
</table>
以上是关于html5,表格的主要内容,如果未能解决你的问题,请参考以下文章