iFrame Substitutes
If you need to include external content, or scrolling content, within a static setion of your webpage, you may be inclined to use an inline frame (IFRAME). IFRAMEs are not web-standards compliant, however, nor are they search-engine optimized, and search engines recognize them as a separate webpage from your own. Because of this, you may ultimately elect not to use an IFRAME, but to choose alternatives.
-
Inline Frames
-
In HTML, you can use an IFRAME to embed a separate webpage. IFRAMEs turn static webpages into dynamic pages. IFRAMEs can also be used to link to long content, such as "Terms and Conditions," when you need the text to be in a frame. The frame will be much smaller than the overall content's size; you can use an IFRAME to clip the data.
Alternative 1 - Embed
-
The <embed> tag does not fix any of the problems associated with search engines or optimization, but can perform roughly the same task as an IFRAME. Instead of using opening and closing <embed> tags, as you would with an IFRAME, you include just the one:
<embed src="content.html">
-
Alternative 2 - CSS & DIV
-
This alternative avoids the main challenges with IFRAMEs: search engine optimization and web standards. The drawback of using a CSS/DIV combination, however, is that you cannot include an entire web page's contents, as you would with an IFRAME. This IFRAME alternative is suited for large pieces of text. Implement this alternative by adding a div class to your stylesheet that specifies a width, height and overflow parameter, and then inserting a div tag within your HTML body. Type the web content within the div tag, rather than externally linking it.
Alternative 3 - UFRAME
-
This alternative combines functions of the UpdatePanel from the ASP.NET coding language and combines it with IFRAME scripting. This IFRAME substitute's code only works on internal data, however, and so you cannot use it to link to an externally located website or source. UFRAME should be used when linking to ASP content or similar dynamic pages, where an IFRAME may ruin the coding. Implement UFRAME by installing the code to your server and then implementing a "UFRAME" class and "UFRAME" id parameter into a div tag. Instead of writing the content within the div tag, insert an "src=content.aspx" parameter within the div tag.
-