Home arrow HTML arrow Page 2 - The Ins and Outs of Iframes
HTML

The Ins and Outs of Iframes


The term "iframes" is short for "inline frames." Maybe you have never heard of iframes, or maybe you have avoided them because the name incorporates the "F" word, i.e. "frames," which are said to do bad things like confuse search engines. If so, this article will introduce you to a very useful and versatile web design tool that you have been missing out on. If you have already used iframes, but for only basic things, this article will show you some powerful new uses, such as remote scripting.

Author Info:
By: John Best
Rating: 5 stars5 stars5 stars5 stars5 stars / 1
December 15, 2008
TABLE OF CONTENTS:
  1. · The Ins and Outs of Iframes
  2. · iframes Questions and Answers
  3. · Uses of iframes
  4. · iframe Uses continued

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
The Ins and Outs of Iframes - iframes Questions and Answers
(Page 2 of 4 )

  • Can iframes confuse search engines? They may be able to at least mislead them. Some of the most effective "Black Hat" SEO techniques depend on iframes. Do not rely on any content contained in iframes to be indexed and credited to your page by search engines. This does not, however, mean that you should not use iframes. Unless its purpose is to deceive the search engine, an iframe on your web page should not hurt its search engine performance; it simply may not help.

  • Can iframes be any size? Yes, even 0 by 0. The dimensions are specified by the width and height attributes. An iframe with dimensions of 0 by 0 (with frameborder set to 0) is referred to as a "hidden" iframe.

  • Can iframes be located anywhere on the page? Yes, an iframe can be positioned in the same manner as a block level HTML element using CSS and HTML techniques.

  • What kind of content can an iframe contain? An iframe can contain any kind of page or document that is accessible by a URL and viewable in a web browser, whether it is located on the same site or on a remote site.

  • If dynamic content on a page that is embedded in an iframe changes, is this change immediately reflected in the iframe contained in the parent page? Yes, when you load another page into an iframe, it isn't an image or snapshot of the other page you are seeing in the iframe; it is the actual page itself. This is a key to the use of iframes for remote scripting, which we will discuss in part two of this article.

  • Can an iframe resize itself to accommodate dynamic content of varying size? No, the size is fixed. iframes use scrollbars instead. Scrolling is controlled by the scrolling attribute. The options are yes, no, and auto, with the default being auto. If scrolling is disabled, the contained page is truncated at the borders of the iframe. This is a disadvantage of iframes for remote scripting compared to AJAX request-response techniques.

  • Are iframes supported by all browsers? Yes, all major modern browsers support iframes.

  • Do iframes have a border? An optional border can be specified by the frameborder attribute. The options are 0 and 1.

  • Do links contained on a page within an iframe redirect the parent page? No, they redirect the page in the iframe.

  • Can the page displayed within the iframe change (redirect) as the iframe is being viewed? Yes, the page within the iframe can be redirected to another URL.


blog comments powered by Disqus
HTML ARTICLES

- HTML5 Boilerplate: Working with jQuery and M...
- HTML5 Boilerplate Introduction
- New API Platform for HTML5
- BBC Adopts HTML 5, Mozilla Addresses Issues
- Advanced Sticky Footers in HTML and CSS
- HTML and CSS Sticky Footers
- Strategy Analytics Predicts HTML5 Phones to ...
- HTML5 Guidelines for Web Developers
- Learning HTML5 Game Programming
- More Engaging CSS3 and HTML Background Effec...
- Engaging HTML and CSS3 Background Effects
- More Web Columns with CSS3 and HTML
- Columns with CSS3 and HTML
- Creating Inline-Block HTML Elements with CSS
- Drag and Drop in HTML5: Parsing Local Files

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 9 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials