HTML 中的 <thead>属性

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

HTML <thead>标签用于将标题添加到表中。

Thead示例

<!DOCTYPE html>
<html>

   <head>
      <title>HTML thead 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-thead-tag.html

来源:LearnFk无涯教程网

全局属性

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

特定属性

HTML <thead>标签还支持以下附加属性-

Attribute Value 描述
align right
left
center
justify
char
不推荐使用-外观对齐。
char character 不推荐使用-指定要在其上对齐文本的字符。在align =“ char”时使用
charoff pixels or % 不推荐使用-指定使用char属性指定的第一个字符的对齐偏移量。在align =“ char”时使用
valign top
middle
bottom
baseline
不推荐使用-垂直对齐。

事件属性

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

浏览器支持

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

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

技术教程推荐

技术与商业案例解读 -〔徐飞〕

职场求生攻略 -〔臧萌〕

跟月影学可视化 -〔月影〕

深度学习推荐系统实战 -〔王喆〕

搞定音频技术 -〔冯建元 〕

超级访谈:对话玉伯 -〔玉伯〕

运维监控系统实战笔记 -〔秦晓辉〕

AI 应用实战课 -〔黄佳〕

手把手带你写一个 MiniTomcat -〔郭屹〕

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