html中的div span和frameset框架标签

来源:互联网 发布:小型公司网络方案 编辑:程序博客网 时间:2024/05/16 19:28

Div和span

1.      div独占一层,由div九不允许有别的。

2.      span标签不是独自占用一行,span一般用来设置字体。

框架标签:


什么是框架标签,就是把一个页面分成很多块,来分别显示显示不同的页面,下面看一下这个例子就能完全懂了。


1.首先在同一个文件下建立如下的三个html文件。

2.分别在left,top,right文件中写入相应的html代码。

left:

<html><head><title></title></head><body bgcolor=red><a href="http://www.baidu.com" target="right">baidu</a><a href="http://www.cnbeta.com" target="right">cnbeta</a></body></html>

top:

<html><head><title></title></head><body bgcolor=black>im top;</body></html>

right:

<html><head><title></title></head><body bgcolor=green>im right;</body></html>

以上代码完全为了刻意的填充html内容。

下面,index里面的代码是重头戏:

<html><head><title></title></head><frameset rows="30%,*">  //frameset只能实现上下分块(row),或者左右分块(cols),若想实现上下左右分,则要在frameset标签里面嵌套frameset标签。<frame src="top.html" noresize="noresize"/><frameset cols="30%,*"><frame src="left.html" noresize="noresize"/><frame src="right.html" name="right"/>  //name的作用与left页面中a标签的target对应,当点击链接时,新的页面将会在target中打开。</frameset></frameset></html>
最终效果如图:

0 0