left-image

build-website-header
spacer-image
 

Using IFrames

IFrames or Inline frames are very useful web elements when used correctly. Like normal frames they can be used for placing content from another page or website onto a web page.

Inline frames are surprisingly simple to use and have many uses, but the one thing you should remember is that the content of the IFrame is probably not indexed by search engines.

When not to use

If you want the content that the IFrame contains to be indexed by the search engines then you should not place it in an IFrame, or you should give the search engines an alternative way of finding the content.

One of the most common misuses is to provide site navigation. The IFrame contains in effect all the site links to the other pages of the site. Because the search engines don't see the contents of the IFrame they never see the links to the other pages, and hence they never find those pages to index them.

When To use IFrames

IFrames can be used for inserting news clips, quizzes, voting forms, calendars, weather forecasts from other sites or from pages of your own site. In fact in any situation where you aren't worried about whether or not the search engines see the actual content, but want to display information from another page, and you don't want the visitor to leave the page they are viewing.

IFrames Example

The example I will cover here is a simple quiz. The question is held on page called questions.htm and the answer on answers.htm.

Click here and the answer will appear in the frame below. Click here to see the question again

Although a very simple example it does demonstrate how powerful IFrames can be. The IFrame code can be placed on hundreds of sites/pages and can be controlled by simply changing two pages.

Here is the IFrame source code with the IFrame element highlighted in yellow. The green highlight show how the contents of the IFrame are changed using a standard link with the IFrame as a target.:

<p>Click <a target="example1" title="click to run script" href="examples/answers.htm">here</a> and the answer will appear in the frame below. Click
<a target="example1" title="click to reset" href="examples/questions.htm">here</a> to see the question again</p>
<p><iframe src="examples/questions.htm" name="example1" width="300" height="200" scrolling="yes">the example is</iframe></p>
 

For those of you thinking of setting up calendars IFrames make an Ideal mechanism for displaying family/business calendars on a web page. Here is another example using IFrames for Calendars.

For more information on IFrames like controlling the windows, scrolling etc and for the details on setting up the previous example see IFrames Explained.

 



yahoo
Add to My Yahoo!
msn


Free Newsletter!