当前位置:主页 > 查看内容

HTML标签tbody的用法与说明

发布时间:2021-07-08 00:00| 位朋友查看

简介:tbody 元素应该与 thead 和 tfoot 元素结合起来使用。 表格的分组显示(Structured Table) (IExplore Only) 一、按行分组 thead ... /thead - 表的题头(Header) tbody ... /tbody - 表的正文(Body) tfoot ... /tfoot - 表的脚注(Footer) 例: table border t……
tbody 元素应该与 thead 和 tfoot 元素结合起来使用。

  表格的分组显示(Structured Table) (IExplore Only)

一、按行分组

<thead> ... </thead> - 表的题头(Header)
<tbody> ... </tbody> - 表的正文(Body)
<tfoot> ... </tfoot> - 表的脚注(Footer)

例:
<table border>
<thead>
<tr><th>Food</th><th>Drink</th><th>Sweet</th></tr>
</thead>
<tbody>
<tr><td>A</td><td>B</td><td>C</td></tr>
<tr><td>D</td><td>E</td><td>F</td></tr>
</tbody>
</table>

二、按列分组

<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></tr>
</thead>
<tbody>
<tr><td>A</td><td>B</td><td>C</td></tr>
<tr><td>D</td><td>E</td><td>F</td></tr>
</tbody>
</table>

三、列的属性控制

<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></tr>
</thead>
<tbody>
<tr><td>A</td><td>B</td><td>C</td></tr>
<tr><td>D</td><td>E</td><td>F</td></tr>
</tbody>
</table>

原文链接:https://m.jb51.net/web/22366.html
本站部分内容转载于网络,版权归原作者所有,转载之目的在于传播更多优秀技术内容,如有侵权请联系QQ/微信:153890879删除,谢谢!

推荐图文


随机推荐