Inline frames, also known as IFrames, are created with the <IFRAME> tag, which is supported by Explorer 3.2 and up, as well as Netscape 4.0 or better. Inline frames differ from the regular <Frame> tag, as we simply embed them right into an HTML page. No frameset or index pages are required.
Here is an example of how to use a simple IFRAME: <IFRAME SRC="sample.html"></IFRAME>
All we will do place the IFrame into a page, bearing the source of the actual file. This method is handy if you want to give people remote files to include on their site, sourcing a file to yours.
So in our example, an HTML page carrying our IFRAME might look like this:
<HTML> <BODY> Our page ... text, etc ... and now, here comes the IFRAME! <IFRAME SRC="sample.html"></IFRAME> </BODY> </HTML>
The IFRAME Tag does carry some specific attributes to help you control the display. Here is a quick, but limited reference:
ALIGN — Offset to other elements, much like the Image Tag.
FRAMEBORDER — The default is 0 (pixels)
HEIGHT / WIDTH — (pixels or %)
HSPACE / VSPACE — As with Images, this attribute specifies a pixel size for horizontal or vertical margins around the IFRAME (external margin)
MARGINHEIGHT / MARGINWIDTH — Internal margin in pixels
SCROLLING — If set to "AUTO," the browser determines whether scrollbars are necessary; otherwise, specify either "YES" or "NO" Sometimes you can use div instead of Iframes more information here
|