HTML Iframes
HTML Iframes
<iframe> element enables the user to open a window within a window, or a browser within a
browser.
<iframe> tag allows the outside source document to be inserted within the main document.
The iframe Url address must be enclosed within the <iframe> element.
Syntax of an iframe.
height:Controls the height of the iframe. Values can be expressed in "px" or "%“
width:Controls the width of the iframe. Values can be expressed in "px" or "%".
Example:
<!DOCTYPE html>
<html>
<head>
<title> Iframe Example </title>
</head>
<body>
<iframe src="https://ums.lpu.in/lpuums/LoginNew.aspx"
width="200px“ height="200px">
</iframe>
</body>
</html>
iFrame attribute: frameborder
Example:
<!DOCTYPE html>
<html>
<head>
<title>HTML Iframes</title>
</head>
<body>
<p>Document content goes here...</p>
<iframe src="ab.html" width="500" height="200" frameborder="0"
marginheight="50px" marginwidth="10px" name="a">
Sorry your browser does not support inline frames.
</iframe> <br />
<a href="https://ums.lpu.in/lpuums/LoginNew.aspx" target="a">image</a> <br />
<iframe src="ab.html" width="250" height="200" frameborder="0">
Sorry your browser does not support inline frames.
</iframe>
<iframe src="ab.html" width="250" height="200" frameborder="0">
Sorry your browser does not support inline frames.
</iframe>
<p>Document content also go here...</p>
</body>
</html>