HTML5技术

HTML表格的表头_HTML教程

字号+ 作者:H5之家 来源:H5之家 2015-09-17 17:34 我要评论( )

HTML表格的表头,学习HTML表格的表头,HTML表格的表头,查看HTML表格的表头,在HTML语言中,可以自动通过标记为表格添加标题。另外,表格的第一行称为表头,这也可以

在HTML语言中,可以自动通过标记为表格添加标题。另外,表格的第一行称为表头,这也可以通过HTML标记来实现。

基本语法

     <TABLE> ....

  <TR>

   <TH>标题1</TH><TH>标题2</TH><TH>标题3</TH><TH>标题4</TH><TH>标题5</TH>

  </TR>

 ........

</TABLE>

语法解释

通过BORDER属性定义边框线的宽度,单位为像素。

<html>
<head>
<title>表格标记的综合例子</title>
</head>
<body>
<table border="1" width="80%" bgcolor="#e8e8e8" cellpadding="2" bordercolor="#0000ff" bordercolorlight="7d7dff" bordercolordark="#0000a0">
<tr>
<th width="30%" colspan="2" valign="bottom">大西洋赛区</th>
<th width="30%" colspan="2" valign="bottom">中部赛区</th>
<th width="30%" colspan="2" valign="bottom">东南赛区</th>
</tr>
<tr>
<td width="16%" align="center">凯尔特人</td>
<td width="16%" align="center">76人</td>
<td width="17%" align="center">活塞</td>
<td width="17%" align="center">公牛</td>
<td width="17%" align="center">热火</td>
<td width="17%" align="center">奇才</td>
</tr>
<tr>
<td width="16%" align="center">网</td>
<td width="16%" align="center">尼克斯</td>
<td width="17%" align="center">步行者</td>
<td width="17%" align="center">骑士</td>
<td width="17%" align="center">魔术</td>
<td width="17%" align="center">山猫</td>
</tr>
<tr>
<td width="16%" align="center">猛龙</td>
<td width="16%" align="center">过江</td>
<td width="17%" align="center">雄鹿</td>
<td width="17%" align="center">芝加歌</td>
<td width="17%" align="center">老鹰</td>
<td width="17%" align="center">姚明</td>
</tr>
</table>
</body>
</html>

其中<TH></TH>是指的表格的表头和标题。

 

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

相关文章
  • HTML表格的标题_HTML教程

    HTML表格的标题_HTML教程

    2015-09-17 17:33

  • HTML表格的表头 _HTML教程

    HTML表格的表头 _HTML教程

    2015-09-17 16:23

网友点评