html thead标签怎么用
导读:收集整理的这篇文章主要介绍了html thead标签怎么用,觉得挺不错的,现在分享给大家,也给大家做个参考。<thead>标签定义及用法1、在htML中,<thead>标签是用来组合html表格的表头内容,通常与&l...
收集整理的这篇文章主要介绍了html thead标签怎么用,觉得挺不错的,现在分享给大家,也给大家做个参考。thead> 标签定义及用法
1、在htML中,thead> 标签是用来组合html表格的表头内容,通常与tbody> 标签和tfoot> 标签一起使用,分别用来定义表格的表头、主体和页脚。
2、thead> 标签必须是table> 标签元素的子元素,应用在caption> 标签、colgroup> 标签之后,tbody> 和tfoot> 标签之前。
3、thead> 标签、tbody> 标签和tfoot> 标签默认情况下不会影响表格的布局,通常使用css来定义表格的样式。
thead> 标签基本属性(html5已经不支持)
align right:thead> 元素中内容的对齐方式(值:left、center、justify、char)。
char:thead> 元素中内容根据哪个字符来对进行文本对齐(值:character)。
charoff:thead> 元素中内容的第一个对齐字符的偏移量(值:number)。
valign:thead> 元素中内容的垂直对齐方式(值:top、middle、bottom、baseline)。
thead> 标签支持html全局属性和html事件属性
格式
thead> tr> td> ....../td> /tr> ....../thead>
实例
!doctyPE html> html> head> meta charset="UTF-8"> tITle> html tbody> 标签笔记/title> /head> body> table border="1"> thead> tr> th> thead1/th> th> thead2/th> th> thead3/th> /tr> /thead> tfoot> tr> td> tfoot1/td> td> tfoot2/td> td> tfoot3/td> /tr> /tfoot> tbody> tr> td> tbody1/td> td> tbody2/td> td> tbody3/td> /tr> /tbody> /table> /body> /html>
运行结果:
以上就是html thead标签怎么用的详细内容,更多请关注其它相关文章!
声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!
若转载请注明出处: html thead标签怎么用
本文地址: https://pptw.com/jishu/590664.html