HTML <tfoot>标签
HTML <tfoot>标签作用
HTML <tfoot>标签用于定义代表HTML表页脚的行集。<tfoot>标签必须包含一个或多个<tr>元素。
<tfoot>标签与和元素一起用作HTML表(<table>)的子元素,其中定义表头,而定义表头。表主体。
注意:提示:,和<tfoot>元素不会影响表布局,如果要应用表布局的更改,请使用CSS属性。
语法
<tfoot>
<tr></tr>
<tr></tr>
</tfoot>
以下是有关HTML <tfoot>标签的一些规范
显示 |
无 |
开始标签/结束标签 |
开始和结束标签 |
用法 |
HTML表格 |
示例
<!DOCTYPE html>
<html>
<head>
<title>HTML tfoot Tag</title>
<style>
table{
border-collapse: collapse;
}
thead,tfoot{
background-color:#3f87a6;
}
tbody{
background-color:#97ffff;
}
</style>
</head>
<body>
<h1>Example of tfoot tag</h1>
<table border="1" >
<thead>
<tr>
<th>Items</th>
<th>Quantity</th>
<th>Expenditure</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Total</th>
<th>90</th>
<th>4175</th>
</tr>
</tfoot>
<tbody>
<tr>
<td>Books</td>
<td>5</td>
<td>1500</td>
</tr>
<tr>
<td>Drawing-Paper</td>
<td>50</td>
<td>800</td>
</tr>
<tr>
<td>Marker</td>
<td>35</td>
<td>1875</td>
</tr>
</tbody>
</table>
</body>
</html>
输出:
属性:
标签特定的属性:
属性 |
值 |
说明 |
align |
right left center justify char |
它确定<tfoot>元素内内容的对齐方式。 (HTML5不支持) |
char |
Character |
它指定<tfoot>元素内的内容与字符的对齐方式。 (HTML5不支持) |
charoff |
Number |
它从char属性指定的字符中指定内容要对齐的字符数。 (HTML5不支持) |
valign |
top middle bottom baseline |
它确定<tfoot>元素内内容的垂直对齐方式。 (HTML5不支持) |
全局属性:
<tfoot>标签支持HTML中的全局属性。
事件属性:
<tfoot>标签支持HTML中的Event属性。
支持浏览器