<IFRAME ...>

Usage Recommendation
Use it, but be particularly careful to include options for the many people whose browsers don't do inline frames.

<IFRAME ...> is an HTML 4.0 addition to the frames toolbox. Currently only MSIE supports <IFRAME ...>.

Unlike frames created using <FRAMESET ...> and <FRAME ...>, <IFRAME ...> creates a frame that sits in the middle of a regular non-framed web page. <IFRAME ...> works like <IMG ...>, only instead of putting a picture on the page, it puts another web page.

For example, within the same directory as this page there is a file called "hello.html". This code puts hello.html into an inline frame:

<IFRAME SRC="hello.html" WIDTH=450 HEIGHT=100>
If you can see this, your browser doesn't 
understand IFRAME.  However, we'll still 
<A HREF="hello.html">link</A> 
you to the file.
</IFRAME>

which gives us this inline frame:

Here's what the code means:

IFRAME
The name of the <IFRAME ...> tag

SRC="hello.html"
The URL of the document to show in the inline frame.

WIDTH=450 HEIGHT=100
The dimensions of the inline frame.

If you can see this, your browser doesn't understand IFRAME. However, we'll still <A HREF="hello.html">link</A> you to the file.
Code between <IFRAME ...> and </IFRAME> is not displayed by browsers that understand <IFRAME ...>. Browsers that do not understand <IFRAME ...> will display this code (because they don't know to ignore it).

You can do most of the things with <IFRAME ...> that you can do with regular frames, including set the frame border, set internal margins, and set if there are scroll bars. You can use the attribute so that you can set links to target the frame.

You can also control a few settings similar to the <IMG ...> tag, including ALIGN, HSPACE, and VSPACE.

Parent: 
Frames