html 表格:thead vs th [英] html tables: thead vs th
问题描述
看起来(无论如何,根据此页面上的示例)如果您正在使用 THEAD,您不需要使用 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.
这是真的吗?如果是这样,THEAD 与 TH 的优缺点是什么?
Is that true? If so, what are the advantages/disadvantages of THEAD vs TH?
推荐答案
The 更多:thead 您使用 You use "这个划分使用户代理能够支持滚动表格主体独立于桌头和脚.打印长表时,表头脚信息可以在每一页上重复包含表数据." "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." 这篇关于html 表格:thead vs th的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! 标签用于对 HTML 表格中的标题内容进行分组.
thead
元素应该与 tbody
和 tfoot
元素结合使用.
<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. 来封装整行(或多行)以将它们指定为表头.根据规范,
<thead>
to encapsulate an entire row (or rows) to designate them as the Table Header.
According to the spec,
,另一方面,用于将特定单元格设置为标题单元格而不是普通的数据单元格.
<th>
, on the other hand, is used to style a specific cell as a header cell
rather than an ordinary data cell.
登录
关闭