Web Designing Basics (HTML and CSS)

 by vishalapr
Contest WinnerFeatured

Step 14: Frames and IFrames in HTML

Frames and IFrames are the same thing, as they are used to show a webpage in a box like thing inside another webpage....

IFrame is used when you only have one webpage you want to show on your webpage in a little box...

<iframe src="http://www.google.com"></iframe>
This will show www.google.com in a small frame in your website...

<frameset>
<frame src="
http://www.google.com"></frame>
<frame src="
http://www.facebook.com"></frame>
</frameset>


Frames always are inside a <frameset> and </frameset> tags as these tags group the frames...<frame></frame> do the exact same thing as <iframe></iframe> but they are used when you have more than 1 frame (webpage) you want to show and are grouped by <frameset> tags...How many ever frames you insert, those are shown in the same browser window and they are split equally...

When using frames, you cannot use the <body></body> tags so all you can do is display more than 1 webpage in a browser window...Adding the <body></body> tags will stop the <frame> tags from working

An easy way to remember which is which, iframe is for single frames as "I Frame" sounds like "Independent Frame"
These tags are not very common in most of the websites..but some websites still do use these tags...
 
Remove these adsRemove these ads by Signing Up
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!