网页制作 
首页 > 网页制作 > 浏览文章

html tbody 用法

(编辑:jimmy 日期: 2024/5/20 浏览:3 次 )
表格的分组显示(Structured Table) (IExplore Only)
1)按行分组
<thead> ... </thead> - 表的题头(Header) <tbody> ... </tbody> - 表的正文(Body) <tfoot> ... </tfoot> - 表的脚注(Footer)
例: <table border> <thead> <tr><th>Food</th><th>Drink</th><th>Sweet</th> </thead> <tbody> <tr><td>A</td><td>B</td><td>C</td> <tr><td>D</td><td>E</td><td>F</td> </tbody> </table>
2)按列分组
<colgroup align=#> #=left, right, center
例: <table border width=160> <colgroup align=left> <colgroup align=center> <colgroup align=right> <thead> <tr><th>Food</th><th>Drink</th><th>Sweet</th> </thead> <tbody> <tr><td>A</td><td>B</td><td>C</td> <tr><td>D</td><td>E</td><td>F</td> </tbody> </table>
3)列的属性控制
<col span=#> #=从左数起,具有指定属性的列的列数 <col align=#> #=left, right, center
例: <table border width=160> <colgroup> <col align=center span=2> <colgroup align=right> <thead> <tr><th>Food</th><th>Drink</th><th>Sweet</th> </thead> <tbody> <tr><td>A</td><td>B</td><td>C</td> <tr><td>D</td><td>E</td><td>F</td> </tbody> </table>
上一篇:nofollow让评论和留言中的链接起到真正的作用
下一篇:HTML title 属性换行的办法
友情链接:杰晶网络 DDR爱好者之家 南强小屋 黑松山资源网 白云城资源网