Web Development HTML Guide - Learn HTML
Developer Tutorials
ASP
CGI & Perl
CSS
Flash
HTML
Java
JavaScript
Linux
MySQL
PHP
Photoshop
Python
Wireless
XML



Developer Manuals
Learn HTML
Learn PHP
Learn MySQL
Learn CSS
Learn Pear


Developer Scripts
ASP Scripts
ASP.NET Scripts
CGI & Perl Scripts
Flash Scripts
Java Scripts
JavaScript Scripts
PHP Scripts
Python Scripts
Remotely Hosted Scripts
Tools & Utilities Scripts
XML Scripts

Developer Resources
Developer Tools
Developer News
Developer Forums
Developer Content
Developer Book Reviews
Survey Software

Web Hosting Directory
Budget Web Hosting
ColdFusion Hosting
Dedicated Servers
Domain Hosting
E-Commerce Hosting
Email Hosting
Free Web Hosting
Linux Web Hosting
Managed Hosting
Reseller Hosting
Small Business Hosting
Windows Web Hosting

<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 Idocs, Inc. Written by Miko Sullivan











About the NetVisits, Inc Network | Advertise
Developer Tutorials hosted by HostGator.
Copyright ©2007 NetVisits, Inc Network. All Rights Reserved. Privacy Policy.
Visit other NetVisits, Inc. sites: