在HTML语义之后向工作表添加工具栏 [英] Adding a toolbar to a table following HTML semantics
本文介绍了在HTML语义之后向工作表添加工具栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个基本的HTML表格,如下所示:
I have a basic HTML table like so:
<table>
<thead>
<tr>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
</tr>
</tbody>
</table>
我想在它上面添加一个工具栏。将工具栏作为一行添加到 thead
中?是否可以在语义上接受?
I want to add a toolbar above it. Would it be semantically acceptable to add a toolbar as a row in the thead
?
<table>
<thead>
<tr>
<th colspan="2">
<!-- toolbar buttons -->
</th>
</tr>
<tr>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
</tr>
</tbody>
</table>
推荐答案
恕我直言,由于工具栏与表格数据,我发现该工具栏在 thead
中存在一行,没有语义问题。
IMHO, since the toolbar is related to the tabular data, I see no semantic issue with having that toolbar live in a row in the thead
.
这篇关于在HTML语义之后向工作表添加工具栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文