html表格:thead vs th [英] html tables: thead vs th
问题描述
这是真的吗?如果是这样,那么THEAD vs TH的优点/缺点是什么?
< thead>
标记用于将标题内容分组到HTML表格中。
thead
元素应该与 tbody
和 tfoot
元素。
更多: thead
使用< the>
来封装整行(或多行)头。
根据规范,
这个部门使用户代理
支持滚动表格
$ b $另一方面,
< th>
用于样式一个特定的单元格作为标题单元
而不是普通的数据单元。
It looks like (according to the examples on this page, anyways) that if you're using THEAD, you don't need to use TH.
Is that true? If so, what are the advantages/disadvantages of THEAD vs TH?
The <thead>
tag is used to group the header content in an HTML table.
The thead
element should be used in conjunction with the tbody
and tfoot
elements.
More : thead
You use <thead>
to encapsulate an entire row (or rows) to designate them as the Table Header.
According to the spec,
"This division enables user agents to support scrolling of table bodies independently of the table head and foot. When long tables are printed, the table head and foot information may be repeated on each page that contains table data."
<th>
, on the other hand, is used to style a specific cell as a header cell
rather than an ordinary data cell.
这篇关于html表格:thead vs th的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!