html表格:thead vs th [英] html tables: thead vs th

查看:285
本文介绍了html表格:thead vs th的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

看起来像(根据这个页面上的例子),如果你'使用THEAD,你不需要使用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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆