The Web Design Group presents:


Guide to frames usage



Using frames: Overview

To set up a frameset, the first thing required is a determination of the number of rows and columns, and their respective widths and heights. You must also decide now how nested framesets (that is, rows inside a column, or columns inside a row) will be used. If the nested rows or columns will only need to be updated individually, use the nested FRAMESET tags to do so. But if it is ever necessary to update the entire nested frameset, it should be defined in a separate frameset document.

  1. Structure of a frameset document
  2. Combining rows and columns
  3. Targeting other frames
  4. Some examples of good frames usage
  5. Some examples of bad frames usage
  6. Common bugs and limitations with frames

Structure of a frameset document

The frameset document, which contains the FRAMESET element(s) used to set up the frameset, differs from a normal HTML 3.2 document in one aspect: it does not have a BODY section. The FRAMESET element replaces BODY. The HEAD section of the document is still according to HTML 3.2 rules.

A sketch of the frameset given in the example, with two equal-sized rows

<HTML>
<HEAD>
<TITLE>A sample frameset document</TITLE>
</HEAD>
<FRAMESET ROWS="*,*">
<FRAME SRC="foo.html" NAME=foo>
<FRAME SRC="bar.html" NAME=bar>
<NOFRAMES>
<BODY>
...
</BODY>
</NOFRAMES>
</FRAMESET>
</HTML>

The above is an example of a very simple frameset, that consists only of two equally-sized rows. The upper row is named "foo", and the lower row is named "bar". Note that the NOFRAMES section of the document contains a BODY element. This can be used to include an entire document, so that if support for frames is disabled, or not present at all, the viewer gets alternative content.

In most examples, everything other than FRAME and FRAMESET elements will be omitted for brevity.


Web Design Group
Last modified: 31 Mar 1997.
Feedback: galactus@htmlhelp.com
Copyright © 1996 - 2006. Arnoud "Galactus" Engelfriet. All rights reserved.