将分页(NEXT/LAST等)链接放在统计表元素的<tfoot>中是否语义/可接受?

Mar*_*ith 8 html html5 w3c semantics

难以确定是否有必要将有关stats表的分页信息放在表的<tfoot>元素中.

"第1页,共13页"等信息以及"下一页"和"上一页"等链接.

w3c <table>参考和示例不做<tfoot> justice,IMO.

所以,做一些事情:

<table>
<caption>Stats Table!</caption>
<thead>
<tr>
    <th>1</th>
    <th>2</th>
    <th>3</th>
</tr>
</thead>

<tfoot>
    <tr>
        <td colspan="3">
            <a href="">prev pg</a>  <a href="">next pg</a>
        </td>
    </tr>
</tfoot>

<tbody>
    <tr>
        <td>a</td>
        <td>b</td>
        <td>c</td>
    </tr>
    <tr>
        <td>x</td>
        <td>y</td>
        <td>z</td>
    </tr>
</tbody>
Run Code Online (Sandbox Code Playgroud)

一些小的样式看起来像这样(点击例如jsfiddle)

这似乎适合html表的正确语义?任何关于为什么或为什么不参考的参考?

Mic*_*yen 4

我会说是的,这是可以接受的。

传统上,<tfoot>当表格必须跨越边界时(想想打印的页面和类似的东西),通常使用 来复制标题信息。<tbody>当元素在滚动面板中呈现时,它也可以用作静态页脚。我相信这与您想要做的事情足够接近。

作为旁注,我很高兴看到您将 放在<tfoot>之前<tbody>。我已经数不清有多少次看到人们把它放在底部了。