What Is a Frame?

A frame is a division of a browser window which displays a distinct HTML page. A browser window can be divided into multiple frames, with each frame displaying a different HTML page.

In the following picture, I have taken a screenshot of a sample frame page:

Frame Example

The above frame page is actually FOUR HTML pages: one HTML page for the frame document, and three other HTML pages, one page per frame. Frame pages themselves display NO visible content; they merely lay out the frames, determining their dimensions and default pages. All the visible content is displayed with regular HTML pages, one page per frame.

What Are Frames Used For?

Frames are used to help users easily find their way through tangled or difficult-to-navigate content (i.e. multiple chapters in an online book with numerous hyper-referenced footnotes). Frames provide a means for a persistent navigation strip to be available to a user at all times, while providing additional areas for display of content, whether primary or ancillary.

Having said this, it is easiest to explain frames by showing you an example. Here, I have created a demonstration piece which exhibits primary frame characteristics. Without frames, navigating this footnoted excerpt from "Pride and Prejudice" would be very inconvenient, with the user forced to hit the "Back" button again and again.

Note: the interface I am forced to adopt for demonstrating frame examples throughout this module (where I use JavaScript to pop up a new window) is not recommended for general purposes on the Web; in general, links to new areas should ERASE existing framesets. In order to NOT interfere with the frames-based interface and login procedures for SFSU Online, however, I MUST bring up my frames examples in new windows.

Frames are very useful when providing for some sort of persistent element, such as a navigation strip (as seen in the above example) or a flash/shockwave movie. A children's project that I developed some years ago, Boogers and Boogeymen, has a persistent shockwave navigation that handles streaming audio files, and provides non-linear navigation capabilities while tracking user progress throughout the site. This is another instance where frames assist the technical workings of a website in a way that nothing else can. (Note: Boogers and Boogeymen can ONLY be viewed using Netscape Communicator).

That said, frames are much maligned, by developers and users alike. Although frames sites have failings (many of these failings caused by poor design, not by the frames themselves), frames, as you can see, are still a vital part of the HTML standard.

People often fall into two camps regarding frames, either pro-frames or anti-frames. I'm a pro-frames developer myself, but even I suggest using frames ONLY when there is no reasonable alternative.

Why Do People Hate Frames?

Sub-pages within a frameset may not be bookmarked, a feature which many users find annoying. This is probably the number one complaint with users.

Due to the multiplicity of pages involved in a single frame site, the number of simultaneous hits received by a server for the first frame page is greatly increased, causing problems for sites with heavy usage. With a three-frame frames page, for instance, the server receives four hits, instead of one hit as with a regular HTML page, quadrupling traffic for that first page; subsequent pages called from within the frameset, of course, behave normally. This is only a problem with high-traffic web sites.

Search engines tend to catalog sub-pages within a frame site, bringing up sub-pages for users without a frameset or any context. There is a workaround for this problem, but it is an awkward one.

Many inexperienced web programmers (and some experienced ones) use frames to "keep" or "trap" their users within the confines of their frameset; this has become one of the biggest evils in contemporary web design. Marketing people, especially, wish to "brand" the web within a frame containing their company logo, forcing users to surf within this restricted web browser window space from which there is no escape. As users surf the web, they encounter more and more of these "branding" framesets, which they cannot erase or remove, until they have accumulated so many framesets in their browser window that the usable space left for browsing is the size of a postage stamp, forcing them to quit out of their browser altogether. This practice has become such a problem that many major web services will refuse to list or link to your web site if you use "branding" or unerasable framesets. Any link which leads out of your web site MUST erase any framesets in use.


Frames are part of the official HTML specification, and are here to stay. Frames make the navigation of complex content much easier and provide for persistent navigation as well as other persistent elements as the user moves from page to page within the frameset. Frames have several technical drawbacks, however, and may be easily misused. Use frames only when absolutely necessary, avoid using them whenever possible, and, especially, never use frames on the FIRST page of your website.

Main Menu