Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

<IFRAME ...>

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

  • SRC: URL of the document to go in the frame
  • HEIGHT: height of the inline frame
  • WIDTH: width of the inline frame
  • NAME: name of this inline frame
  • LONGDESC: URL of a long description of the contents of the frame
  • FRAMEBORDER: if the frame should have a border around it
 
  • MARGINWIDTH: internal left/right margin for the frame
  • MARGINHEIGHT: internal top/bottom margin for the frame
  • SCROLLING: if the frame should have scroll bars
  • ALIGN: alignment of the frame object to text around it
  • VSPACE: space above and below the frame
  • HSPACE: space to the left and right of the frame

<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.

 
 
  Copyright 1997-2002 Idocs inc. Published under the terms of the Open Content License Design by Interspire