frame和iframe的区别:
1.framset标签与body标签属于同级标签,frame不许嵌套在frameset中才能显示。
2.frame的宽高有framset约束。
3.iframe可以独立存在。(可以在body中使用,也可以单独使用)。
frame代码:
<html>
<head>
<title>frame使用方法</title>
</head>
<!--只有注释body标签才可以显示出来-->
<!--<body>-->
<!-- <frameset cols="50%,*"> -->
<!-- <frame src="https://www.baidu.com/"><frame src="https://www.baidu.com/"> -->
<!-- </frameset> -->
<!--</body>-->
<!-- <frame src="https://www.baidu.com/"> --><!--无法单独显示-->
</html>
ifreme代码:
<html>
<head>
<title>frame使用方法</title>
</head>
<!--可以正常显示-->
<body>
<iframe width="500" height="500"src="https://www.baidu.com/">
</body>
<!--可以正常显示-->
<iframe width="500" height="500"src="https://www.baidu.com/">
</html>