HTML5 <tfoot>标签用于表示一个表格中的页脚。请参考下述示例:
带有 <thead>、<tfoot> 和 <tbody> 元素的 HTML 表格:
<table border="1">
<thead>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
</thead>
<tfoot>
<tr>
<td>Sum</td>
<td>$180</td>
</tr>
</tfoot>
<tbody>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</tbody>
</table>
HTML5 <th>标签用于表示一个表格的表头。请参考下述示例:
一个简单的 HTML 表格,带有两个表头单元格和两个数据单元格:
<table border="1">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>
HTML5 <td>标签用于表示一个表格中的单元格。请参考下述示例:
一个简单的 HTML 表格,带有两个单元格:
<table border="1">
<tr>
<td>Cell A</td>
<td>Cell B</td>
</tr>
</table>
HTML5 <caption>标签用来为表格定义一个标题
<table border="1">
<caption>Monthly savings</caption>
<tr> <th>Month</th> <th>Savings</th> </tr>
<tr> <td>January</td> <td>$100</td> </tr>
</table>
<colgroup> 和 <col> 标签为表格中的三个列设置了背景色:
<table border="1">
<colgroup>
<col span="2" style="background-color:red">
<col style="background-color:yellow">
</colgroup>
<tr>
<th>ISBN</th>
<th>Title</th>
<th>Price</th>
</tr>
<tr>
<td>3476896</td>
<td>My first HTML</td>
<td>$53</td>
</tr>
</table>