table中的一些另类标签

thead/tbody/tfoot/caption/colgroup

注意:thead/tbody/tfoot三部分内容不受编辑顺序影响只和标签本身含义从头到脚显示不能把两个tbody的内容进行合并单元格。

代码段:

<table border="1" width="500">
<caption style="text-align: right">员工收入</caption>
<colgroup style="background-color: red"></colgroup>
<colgroup></colgroup>
<colgroup style="background-color: red"></colgroup>
<colgroup></colgroup>
<thead>
<tr>
<th>month</th>
<th>month</th>
<th>month</th>
<th>money</th>
</tr>
</thead>
<tbody>
<tr>
<td>一月</td>
<td>380</td>
<td>380</td>
<td>380</td>
</tr>
</tbody>
<tbody>
<tr>
<td>二月</td>
<td>380</td>
<td>380</td>
<td>380</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>三月</td>
<td>400</td>
<td>400</td>
<td>400</td>
</tr>
</tfoot>
</table>
原文地址:https://www.cnblogs.com/ytsbk/p/7211042.html