How to make IFrames
Frames allows users to present the documents in different windows or subwindows.The Iframe is an Inline frame.We can make use of IFrame to display a whole webpage inside another webpage.To make an IFrame,all we have to do is to insert the following code in the area you want to display
<iframe src=”yourpage.html” name=”iframeexample” scrolling=”auto” width=”200″ height=”200″ frameborder=”1″></iframe>
To make it simple,lets make two simple html pages and insert one html page inside another as an iframe.
Here is the first html page named as iframe1.html
<html>
<head>
<title>IFrames Example</title>
</head>
<body>
<p>
Your contents here!!!
</p>
</body>
</html>
The second html page named as iframe2.html
<html>
<head>
<title>IFrames Example</title>
</head>
<body>
<table border="1">
<tr>
<td>
<p>
This is the page in which you will insert an iframe
</p>
</td>
</tr>
<tr>
<td>
<iframe src="iframe1.html" scrolling="auto" name="myiframe" frameborder="1"/>
</td>
</tr>
</table>
</body>
</html>
As you can see,the src attribute tells the iframe which page is to be loaded inside the iframe.The scrolling is always good to use.The name attribute is not compulsory,but may be helpful when you want to load multiple iframes.We can also specify the width,height and the frameborder of the iframe.We can also insert some message in between the <iframe> and </iframe> tags to be shown on browsers not supporting iframes.
No related posts.








Leave your response!