Table 的属性

table表格的常用属性


1.width              单元格的宽度
2.height             单元格的高度
3.align              水平对齐位置
4.background         背景图片
5.bgcorlor           背景颜色
6.border             边框宽度
7.bordercolor        边框的颜色
8.bordercolorlight   表格边框明亮部分的颜色
9.bordercolordark    表格边框昏暗部分的颜色
10.cellspacing       单元格之间的间距
11.cellpadding       单元格的内容和单元格的边界之间的空白距离的大小

 

frame               表示了边框显示状态

下面就是Frame的属性值

1.box                显示全部表格的边框
2.void               不显示表格的边框
3.hsides             只显示表格的上下边框
4.vsides             只显示表格的左右边框
4.alove              只显示表格的上边框
5.below              只显示表格的下边框
6.lhs                只显示表格的左边框
7.rhs                只显示表格的右边框

 

rules              表示了显示分隔线的状态

下面就是rules的属性值
1.all                显示所有的分隔线
2.groups             只显示组与组的分隔线
3.rows               只显示行与行的分隔线
4.cols               只显示列与列的分隔线
5.none               所有分隔线都不显示

 

通过TABLE属性,对表格有了一个直观的了解,今天我也编写了一段小程序。

 

 

<html>
<table width="100" height="100" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
     <th width="10" height="10">&nbsp;&nbsp;</th>
     <th width="10" height="10">&nbsp;&nbsp;</th>
     <th width="10" height="10">&nbsp;&nbsp;</th>
	  <th width="10" height="10">&nbsp;&nbsp;</th>
	  <th width="10" height="10" bgcolor="Black">&nbsp;&nbsp;</th>
	  <th width="10" height="10">&nbsp;&nbsp;</th>
	  <th width="10" height="10">&nbsp;&nbsp;</th>
	  <th width="10" height="10">&nbsp;&nbsp;</th>
	  <th width="10" height="10">&nbsp;&nbsp;</th>
	  <th width="10" height="10">&nbsp;&nbsp;</th>
  </tr>
    <tr>
     <td bgcolor="Black">&nbsp;</td>
     <td bgcolor="Black">&nbsp;</td>
     <td bgcolor="Black">&nbsp;</td>
	  <td bgcolor="Black">&nbsp;</td>
	  <td bgcolor="Black">&nbsp;</td>
	  <td bgcolor="Black">&nbsp;</td>
	  <td bgcolor="Black">&nbsp;</td>
	  <td bgcolor="Black">&nbsp;</td>
	  <td bgcolor="Black">&nbsp;</td>
	  <th>&nbsp;</th>
  </tr>
    <tr>
     <th bgcolor="Black">&nbsp;</td>
     <th>&nbsp;</th>
     <th>&nbsp;</th>
	  <th>&nbsp;</th>
	  <th>&nbsp;</th>
	  <th>&nbsp;</th>
	  <th>&nbsp;</th>
	  <th>&nbsp;</th>
	  <th bgcolor="Black">&nbsp;</th>
	  <th width="10" height="10">&nbsp;</th>
  </tr>
    <tr>
     <th>&nbsp;</th>
     <th>&nbsp;</th>
     <th>&nbsp;</th>
	  <th bgcolor="Black">&nbsp;</th>
	  <th bgcolor="Black">&nbsp;</th>
	  <th bgcolor="Black">&nbsp;</th>
	  <th>&nbsp;</th>
	  <th>&nbsp;</th>
	  <th>&nbsp;</th>
	  <th>&nbsp;</th>
  </tr>
    <tr>
     <th>&nbsp;</th>
     <th>&nbsp;</th>
     <th>&nbsp;</th>
	  <th>&nbsp;</th>
	  <th bgcolor="Black">&nbsp;</th>
	  <th>&nbsp;</th>
	  <th>&nbsp;</th>
	  <th>&nbsp;</th>
	  <th>&nbsp;</th>
	  <th>&nbsp;</th>
  </tr>
    <tr>
     <th>&nbsp;</th>
     <th bgcolor="Black">&nbsp;</th>
     <th bgcolor="Black">&nbsp;</th>
	  <th bgcolor="Black">&nbsp;</th>
	  <th bgcolor="Black">&nbsp;</th>
	  <th bgcolor="Black">&nbsp;</th>
	  <th bgcolor="Black">&nbsp;</th>
	  <th bgcolor="Black">&nbsp;</th>
	  <th>&nbsp;</th>
	  <th>&nbsp;</th>
  </tr>
    <tr>
     <th>&nbsp;</th>
     <th>&nbsp;</th>
     <th>&nbsp;</th>
	  <th>&nbsp;</th>
	  <th bgcolor="Black">&nbsp;</th>
	  <th>&nbsp;</th>
	  <th>&nbsp;</th>
	  <th>&nbsp;</th>
	  <th>&nbsp;</th>
	  <th>&nbsp;</th>
  </tr>
    <tr>
     <th>&nbsp;</th>
     <th>&nbsp;</th>
     <th>&nbsp;</th>
	  <th>&nbsp;</th>
	  <th bgcolor="Black">&nbsp;</th>
	  <th>&nbsp;</th>
	  <th>&nbsp;</th>
	  <th>&nbsp;</th>
	  <th>&nbsp;</th>
	  <th>&nbsp;</th>
  </tr>
    <tr>
     <th>&nbsp;</th>
     <th>&nbsp;</th>
     <th>&nbsp;</th>
	  <th>&nbsp;</th>
	  <th bgcolor="Black">&nbsp;</th>
	  <th>&nbsp;</th>
	  <th>&nbsp;</th>
	  <th>&nbsp;</th>
	  <th>&nbsp;</th>
	  <th width="10" height="10">&nbsp;</th>
  </tr>
    <tr>
     <th>&nbsp;</th>
     <th>&nbsp;</th>
     <th>&nbsp;</th>
	  <th bgcolor="Black">&nbsp;</th>
	  <th bgcolor="Black">&nbsp;</th>
	  <th>&nbsp;</th>
	  <th>&nbsp;</th>
	  <th>&nbsp;</th>
	  <th>&nbsp;</th>
	  <th>&nbsp;</th>
  </tr>
  
   
</html>

 

通过今天呢,发现自己还是有问题的,就是对标签不是很熟悉。有一小部分的标签记得不是很清楚,导致编写程序的时候要去看看标签,所以以后还是要经常使用标签,才能让自己更加熟悉。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值