HTML 5 <tfoot> 标签

定义和用法

定义表格的页脚(脚注)。

thead、tfoot 以及 tbody 元素使您有能力对表格中的行进行分组。当您创建某个表格时,您也许希望拥有一个标题行,一些带有数据的行,以及位于底部的一个总计行。这种划分使浏览器有能力支持独立于表格标题和页脚的表格正文滚动。当长的表格被打印时,表格的表头和页脚可被打印在包含表格数据的每张页面上。

HTML 4.01 与 HTML 5 之间的差异

在 HTML 5 中,不支持 <tfoot> 标签的任何属性。

提示和注释:

注释:<tfoot> 内部必须拥有 <tr> 标签!

注释:如果您使用 thead、tfoot 以及 tbody 元素,您就必须使用全部的元素。它们的出现次序是:thead、tfoot、tbody,这样浏览器就可以在收到所有数据前呈现页脚了。您必须在 table 元素内部使用这些标签。

例子

<table>

  <thead>
    <tr>
      <td>THEAD 中的文本</td>
    </tr>
  </thead>

  <tfoot>
    <tr>
      <td>TFOOT 中的文本</td>
    </tr>
  </tfoot>

  <tbody>
    <tr>
      <td>TBODY 中的文本</td> 
    </tr>
  </tbody>

</table>

属性

标准属性

class, contenteditable, contextmenu, dir, draggable, id, irrelevant, 
lang, ref, registrationmark, tabindex, template, title

如需完整的描述,请访问 HTML 5 中标准属性

事件属性

onabort, onbeforeunload, onblur, onchange, onclick, oncontextmenu, 
ondblclick, ondrag, ondragend, ondragenter, ondragleave, ondragover, 
ondragstart, ondrop, onerror, onfocus, onkeydown, onkeypress, onkeyup, 
onload, onmessage, onmousedown, onmousemove, onmouseover, onmouseout, 
onmouseup, onmousewheel, onresize, onscroll, onselect, onsubmit, onunload

如需完整的描述,请访问 HTML 5 中事件属性