1. Technology

Advanced Frames Tricks

The Base Tag and the Inline Frame


The base Default Target

This is an easy way to specify the default target for all of your links on a page. Instead of naming the target in every link, you simply put the base tag in the <head> portion of your document:
<base target="contents">

All links in the above document would automatically load in the contents frame, unless I specifically name a different target.

The Inline Frame

Advanced browsers let you define a frame from within the middle of a conventional document, just like you might define an image or multi-media element.

The iframe tag is not used within a frameset, but within a document anywhere you might use the img tag. The primary difference is that it requires an ending /iframe tag.

When you use an iframe tag, it's best to put explanatory information in the contents of the tag for other browsers. Inline frames compliant browsers will ignore these comments, while other browsers ignore the iframe tag and display the contents.

Here is an example of the HTML for an inline frame:
...preceding content
<iframe src="body.html" width=200 height=100 align=right>
You are not using Internet Explorer or an IFrames compliant browser. To view this <a
href="body.html">in-line frame</a> correctly, you'll need
an iframe compliant browser.
...following content

You can see this page at bl_inline.htm. Be sure to use Internet Explorer or Mozilla or another inline frames compliant browser.

©2014 About.com. All rights reserved.