Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
494 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...