HTML frameLOGIN

HTML frame

iframe is an inline frame, which generates an internal frame in the page.

Iframe tag, also called floating frame tag, you can use it to embed an HTML document in an HTML display. The biggest feature that is different from the Frame tag is that the HTML file referenced by this tag is not displayed independently from other HTML files, but can be directly embedded in an HTML file and integrated with the content of the HTML file to become a whole. In addition, , you can also display the same content multiple times on a page without having to write the content repeatedly. A vivid metaphor is "picture-in-picture" TV.

iframe syntax:

##<iframe src="URL"></iframe>

The URL points to a different web page.

Iframe usage analysis <iframe frameborder=0 width=170 height=100 marginheight=0 marginwidth=0 scrolling =no src="move-ad.htm"></iframe>
<IFRAME> is used to set a floating frame or container for text or graphics.

BORDER <IFRAME BORDER="3"></IFRAME>
Set the width of the edge around the frame

FRAMEBODER <IFRAME FRAMEBODER="0"></IFRAME>
Set whether the border is 3-dimensional (0=no, 1=yes)

HEIGHT,WIDTH <IFRAME HEIGHT="31" WIDTH="88"></IFRAME>
Set the width and height of the border

SCROLLING <IFRAME SCROLLING ="NO"></IFRAME>
Whether there is a scroll bar (YES,NO,AUTO)

SRC <IFRAME SRC="GIRL.GIF"> </IFRAME>
Specify the file or image called by IFRAME (HTML, HTM, GIF, JPEG, JPG, PNG, TXT, *.*)

Display directory link page

<iframe src="demo_iframe.htm" name="iframe_a"></iframe>

<p><a href="http://www.php.cn " target="iframe_a">php.cn</a></p>

Example 1:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>php.cn </title>
</head>
<body>
 
<iframe src="http://www.php.cn /" width="300" height="200" frameborder="0">
 <p>您的浏览器不支持  iframe 标签。</p>
</iframe>
 
</body>
</html>

Example 2:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<title>php.cn</title> 
</head>
<body>
 
<iframe src="http://www.baidu.com" width="50%" height="30%">
您的浏览器不支持框架,请升级您的浏览器以便正常访问
</iframe>
 
 
</body>
</html>


Next Section

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php.cn</title> </head> <body> <iframe src="http://www.baidu.com" width="20%" height="50%"> 您的浏览器不支持框架,请升级您的浏览器以便正常访问 </iframe> </body> </html>
submitReset Code
ChapterCourseware