简单的网页表格页面的嵌套例子

由于明天要考试今天就没有学习新知识,所以只是试着不看课件写一下一个非常简单的代码,才知道看起来很简单的东西也会犯错误,自己试一下后觉得在以后的学习中会看到更多的细节,提高学习效率。这是我的今天的学习收获,希望大家在学习往后也保持这经常课后练习的习惯。

今天写得是一个非常简单的代码,如下:

<html>
   <head>
   <title>training Page layout</title>
   </head>
   <body  topmargin="0">
   <table border="1px" width="960" align="center" cellpadding="0" cellspacing="0" >
     <tr height="90" bgcolor="orange" align="center"><td><font size="6" color="white"><b>页面一</b></font></td></tr>
     <!--在某些浏览器中border="0"是不会出现边框的,所以这里写border="1"-->
	 <tr>
	    <td>
	    <table width="30%" height="400" border="" align="left" cellpadding="0" cellspacing="0">
		 <tr align="center" bgcolor="sky blue">
	   <td><font size="5" color="green"><b>页面二</b></font></td>
	     </tr>
	    </table>
		<table width="70%" height="400" border="" align="left" cellpadding="0" cellspacing="0">
		 <tr align="center" bgcolor="pink">
		 <!--<table>嵌套中嵌套的<table>是在<tr><td></tr></td>里面的,否则就会脱离嵌套-->
	   <td><font size="5" color="purple"><b>页面三</b></font></td>
	     </tr>
	    </table>
		</td>
	 </tr>
	 <tr height="90" bgcolor="prasinous" align="center">
	 <!--在<tr>,<th>,<td>中align控制的是文字的位置,而在<table>中align控制的是表格在网页上的位置-->
	   <td><font size="6" color="orange"><b>页面四</b></font></td>
	 </tr>
   </table>
   </body>
</html>

希望你们看了也有用,生活愉快。

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值