Helping ordinary people create extraordinary websites!
GET OUR NEWSLETTER
Your Email:
 

Iframes: What are they, how to use them and which browsers support them

By Steve Adcock
2005-05-14


What are iframes?

To understand an iframe, it is usually helpful to contrast it to the generic HTML frame. HTML frames divide the page into separate sections, all populated from different physical pages displayed at once. Users can scroll down one page while keeping another page static, all on the same screen. HTML frames are supported in almost all current browser versions.

In contrast, an inline frame is still a frame, but it appears in the middle of a page. Think of it as a little window on your page, where data from an entirely separate document is displayed. The iframe works independently from the page that displays it. Users can scroll within iframes and link to documents from within them, just like generic HTML frames. Users can not, however, resize the iframe.

NOTE: Iframes support more than simple HTML documents. Users can display everything from HTML, to text documents and even Adobe Acrobat files within the iframe element.

What do iframes look like? If your browser supports iframes, look below for an example:

First, notice a few things. There are no scrollbars simply because the content of my inline document does not span that far. If it did, scrollbars would appear on the right hand side. Additionally, any HTML code works fine within iframes, because the iframe is including another physical HTML page. In essence, we are embedding an entire page within a little window.

Next, let's examine the syntax of the iframe.

Tutorial Pages:
» Iframes: What are they, how to use them and which browsers support them
» What are iframes?
» Inline frame syntax
» Where should iframes be used?


 | Bookmark
Related Tutorials:
» Enrich Your Web Applications
» Microsoft Complicates HTML Emails With Outlook 2007
» Testing Your Forms for Hijacking Vulnerability
» Control Your Domain Registration Data
» HTML Forms POST, GET
» HTML Tables

Advertise with Us!


Tutorials Scripts Web Hosting Developer Manuals
Resources