Q. Explain about IFRAME?
<IFRAME> is an HTML 4.0 addition to frames toolbox. Presently only MSIE supports <IFRAME>. Unlike frames created employing <FRAMESET> and <FRAME>, <IFRAME> creates a frame that sits in the middle of a regular non-framed web page. <IFRAME> works such as <IMG>, only rather than putting a picture on the page, it puts another web page.
For illustration, suppose within the same directory as this page there is a file known as "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. Though we'll still link <A HREF="hello.html">link</A> you to the file.
</IFRAME>
Which gives us this inline frame:
Here's what the code means:
IFRAME
Name of the <IFRAME> tag
SRC="hello.html"
URL of the document to show in inline frame.
WIDTH=450 HEIGHT=100
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> isn't displayed by browsers which understand <IFRAME>. Browsers that don't understand <IFRAME> will display this code (as they don't know how to ignore it).
You can do most of the things with <IFRAME> which you can do with regular frames, including setting frame border, internal margins as well as setting information on scroll bars. You can use attribute so that you can set links to target frame.