HTML 中的 <tbody>属性

首页 / HTML入门教程 / HTML 中的 <tbody>属性

HTML <tbody>标签用于在表中添加主体。tbody标签与thead标签和tfoot标签一起用于确定表格的每个部分(header,footer,body)。

Tbody示例

<!DOCTYPE html>
<html>

   <head>
      <title>HTML tbody Tag</title>
   </head>

   <body>
      <table style="width:100%" border="1">
         <thead>
            <tr>
               <td colspan="4">This is the head of the table</td>
            </tr>
         </thead>
         
         <tfoot>
            <tr>
               <td colspan="4">This is the foot of the table</td>
            </tr>
         </tfoot>
         
         <tbody>
            <tr>
               <td>Cell 1</td>
               <td>Cell 2</td>
               <td>Cell 3</td>
               <td>Cell 4</td>
            </tr>
            <tr>
               ...more rows here containing four cells...
            </tr>
         </tbody>
         
         <tbody>
            <tr>
               <td>Cell 1</td>
               <td>Cell 2</td>
               <td>Cell 3</td>
               <td>Cell 4</td>
            </tr>
            <tr>
               ...more rows here containing four cells...
            </tr>
         </tbody>
         
      </table>
   </body>

</html>

这将产生以下结果-

链接:https://www.learnfk.comhttps://www.learnfk.com/html/html-tbody-tag.html

来源:LearnFk无涯教程网

全局属性

此标签支持- HTML属性参考中所述的所有全局属性。

事件属性

此标签支持- HTML事件参考中所述的所有事件属性。

浏览器支持

Chrome Firefox IE Opera Safari Android
Yes Yes Yes Yes Yes Yes

祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)

技术教程推荐

深入浅出gRPC -〔李林锋〕

程序员的数学基础课 -〔黄申〕

零基础学Java -〔臧萌〕

性能工程高手课 -〔庄振运〕

深入浅出云计算 -〔何恺铎〕

图解 Google V8 -〔李兵〕

技术面试官识人手册 -〔熊燚(四火)〕

Go 语言项目开发实战 -〔孔令飞〕

大型Android系统重构实战 -〔黄俊彬〕

好记忆不如烂笔头。留下您的足迹吧 :)