好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

html中表格与列表的实例教程

今天准备为大家准备了表格和列表。

一、文章有各种数据的 表格 这个网页也不例外。

(1)、标签意思 

<table>----------------------表格开始
  <caption></caption>-------表格标题
    <tr>--------------------行开始标签
      <th></th>-------------表头
      <tb></tb>-------------单元格
    </tr>-------------------行结束标签
</table>---------------------表格结束

(2)、表格样式

   c ellpadding 属性设置单元格边框和单元格内容的距离。
   c ellspacing 属性设置单元格之间的距离。
   border 属性表示边框
width 设置表格的宽。
height 设置表格的高。 [注]:高这个属性最好不小给 table 中写,让它自动撑开就好。但这个可以给 tr 给每行需要的高度

代码

<html>
     <head>
	<title>表格</title>
     </head>
     <body>
	<table border="1px" width="500px" cellpadding="10px" cellspacing="10px">
  		<caption>表格标题</caption>
    		<tr height="50px"> 
      		<th>表头</th>
      		<th>表头</th>
    		</tr>
		<tr> 
      		<td>单元格</td>
      		<td>单元格</td>
    		</tr>
	</table>
     </body>
</html> 

查看更多关于html中表格与列表的实例教程的详细内容...

  阅读:48次