How to implement frames
Tools and techniques for creating pages with frames.
Last modified: 6/5/98

Creating pages that use frames in the ways we recommend requires careful attention to detail. As many commentators have pointed out, it is very common to inadvertently misuse the frame tags in HTML and have undesired behavior. This is similar to other features in programming languages, such as branching ("GOTOs").

Automatic Tools
One way to create pages with frames is to use an automatic tool. This is similar to using a higher level computer language to produce computer machine code. When compared to hand coding in assembler, many modern computer language systems make it easier to produce "correct" code with branch instructions through the use of logical constructs employed by the programmer that the system translates into machine-code GOTOs.

Some of the authoring tools that create HTML handle frames in ways that are appropriate. Different tools help in different situations. It is important to understand how the tool you are using treats frames. For example, some tools are optimized for creating a single frameset for a group of pages, while others can produce separate framesets for each combined "page". Just because an authoring tool can create frames does not mean that it will automatically create the code to implement the style of use you desire.

Tools that can automatically create pages with frames include NetObjects' Fusion, Microsoft's FrontPage, and Trellix's Trellix 2.0. (Trellix 2.0 was used to produce almost all of this web site. It can produce bookmarkable pages, with separate framesets for each page.)

Hand Coding
If you would rather write directly in HTML, you should have a very complete understanding of frames. We have tried to provide enough hints in the description of each use of frames to enable you to find at least one way to do an implementation in plain HTML. Some of the samples are hand coded specifically for you to have examples that work correctly.

In addition to the techniques shown here that mainly rely on static HTML, there are ways of using client-side JavaScript, Java, or ActiveX, to get some of the effects, especially the "You Are Here" indications. Another method, becoming more commonly accepted, is to use server-side programming (such as CGI or ASP) to dynamically produce the framesets or other files needed.