当前位置: 首页 > 网络学院 > 网页制作基础教程 > HTML > HTML <tfoot>标签
Defines a table footer.
定义表格的脚标
The thead, tfoot and tbody elements enable you to group rows in a table. When you create a table, you might want to have a header row, some rows with data, and a row with totals at bottom. This division enables browsers to support scrolling of table bodies independently of the table header and footer. When long tables are printed, the table header and footer information may be repeated on each page that contains table data.
在table中thead,tfoot以及tbody可以让你聚集表格中的多个行。当你建立一个表格的时候你或许希望有一个标题行,一些行来放置数据,最 下的一行来放总计。这样的划分在浏览器中可以使用滚轮从头到尾直接浏览,当打印的时候每有超出部分那么页眉和脚标会重新加到表格上(保证打印出来的每页都 有页眉和脚标)
NONE
无
Note: The <tfoot> must have a <tr> tag inside!
注意:<tfoot>必须在<tr>标签里!
Note: If you use the thead, tfoot and tbody elements, you must use every element. They should appear in this order: <thead>, <tfoot> and <tbody>, so that browsers can render the foot before receiving all the data. You must use these tags within the table element.
注意:当你使用了thead, tfoot 和 tbody元素,那么你就必须使用它们每一个元素,它们出现的次序也应该是这样:<thead>, <tfoot> 和 <tbody>,只有这样浏览器才能在接收所有数据前先得到脚标的信息。还有一点你必须在table元素内使用它们
Note: The <thead>,<tbody> and <tfoot> elements are seldom used, because of bad browser support. Expect this to change in future versions of XHTML. If you have Internet Explorer 5.0 or newer, you can view an example in our XML tutorial.
注意:<thead>,<tbody> 和 <tfoot>并不常用,因为它们的浏览器支持性不好。不过预计会在XHTML中得到改善。如果你有IE以上版本的浏览器,那么你可以看看我们XML教程中的一个举例
代码 | 输出结果 | |||
---|---|---|---|---|
<table border = "1"> <thead> <tr> <td>This text is in the THEAD</td> </tr> </thead> <tfoot> <tr> <td>This text is in the TFOOT</td> </tr> </tfoot> <tbody> <tr> <td>This text is in the TBODY</td> </tr> </tbody> </table> |
|
DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.
下表中的DTD列指明了被支持的DTD属性。S=Strict(精确的),T=Transitional(传统的),F=Frameset(框架)
属性 | 值 | 描述 | DTD |
---|---|---|---|
align | right left center justify char | Defines the text alignment in cells 定义单元格内的文字对齐 | STF |
char | character | Specifies which character to align text on. 指定向哪个字符看齐 Note: Only used if align="char"! | STF |
charoff | pixels % | Specifies the alignment offset to the first character to align on. 取消向第一个字符对齐 Note: Only used if align="char"! | STF |
valign | top middle bottom baseline | Specifies the vertical text alignment in cells 指定文字在单元内的垂直对齐 | STF |
id, class, title, style, dir, lang, xml:lang |
For a full description, go to Standard Attributes.
查看完整的属性
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup |
For a full description, go to Event Attributes.
查看完整的属性