| How frames work: Frames in HTML use the <FRAMESET>, <FRAME>, and <NOFRAMES> tags, and the TARGET attribute of the <A> tag. |
| How to implement frames: Tools and techniques for creating pages with frames. |
| Aren't frames bad?: Many complaints about frames do not apply to INTRAnets today. |
| What others say about frames: A sampling of online opinions. |
| When to use frames: Page identification, navigation, tours, and more. |
| Design ideas on how to use frames: Make them bookmarkable, only one scrollbar, "You are here", how not to use them, exceptions. |
| Integrated into the page design of a single page, to provide separate areas for material such as navigation |
| As the mechanism for associating material from a specific author (such as comments) with other pages that normally stand on their own |
| With frames: The example implemented using frames |
| Without frames: The same visual design, implemented using tables |
| Page Identification or Context Information |
![]() |
| Information that lets readers know their context, including title, summary, or a special image, works well in frames. Otherwise, scrolling the page hides that information. This is similar to a book where the book title, chapter title, and section title are repeated on headers or footers on every page, not just the first page. Book designers have learned that readers need to know where they are. |
| (These illustrations come mainly from samples on this site. Click on the image to go to the sample.) |
| Main Site Navigation |
![]() |
| Commonly used links, such as links to a home page and major sections, should stay accessible using a frame. We have received many requests to add more of this of navigation to the Good Documents site. Common links can include buttons such as the "mailto" link shown in the example (another frequent request from readers). |
| Document Navigation |
![]() |
| Also useful is a complete, compact map of the entire document, such as is used in the "Use maps" technique map demonstration. Maps should be "You Are Here" maps (that indicate the page you are currently viewing) whenever possible. They should be clickable, so that clicking on the representation of a page will follow a link to the page. |
| Local Navigation |
![]() |
| Links to related pages, such as Next/Previous in a list, or sibling button-bars, work very well in frames. Again, "You Are Here" indication is a real plus. |
| Navigating Through a Long, Linear Scrolling Page |
![]() |
| A common use for frames is to have one frame that contains a long page and another frame with a list of links to named anchors inside of the other frame. Clicking on a link causes the browser to scroll the long page to the appropriate place. This is done by using <A> tags with HREF attributes pointing to anchors with NAME attributes and with a TARGET attribute pointing to the frame containing the long page, as in this sample. This is one of the accepted uses of frames with links that do not use TARGET="_top". |
| Sidebars |
![]() |
| Sidebars hold material related to the main text. One type of sidebar material that works well in frames are lists of related links. |
| Summary and other related information often work better in the same frame as the scrolling text than in a separate frame. The reason for this is that the sidebars can get quite long and that can force the frame to require scrollbars (as sometimes happened on the old version of this web site with smaller computer screens, which could be annoying -- the summaries were moved to the top of the main page area in the redesign for that reason). As we point out in the design ideas section, it is often best if only the main text area needs a scrollbar. If the summary or comment is short, or if it is appropriate to have it display even while scrolling the main text area, not just when the page is first displayed, then it may be acceptable for it to be in a frame. |
| Images |
![]() |
| Another type of content appropriate for non-scrolling frames are images that give a sense of place or identify the page or are the subject of the page. Examples are news articles, biographies, or product descriptions, and the photos that go with them. (We have no sample for this use.) |
| Multiple Illustrations Associated with Multiple Links on a Page |
![]() |
| A variation on having an image as the content of a frame is using multiple images that go with references in the text. This style is dependent on the design of the page, but for certain images and text this can eliminate the jumping back and forth from thumbnails to full images. This style of document could be used for a wide variety of purposes, such as showing details of a procedure or other sequence, or in a catalog showing different styles of a product. It is especially useful when the text referring to the image is long so that any in-line image would scroll off. |
| You can examine a sample of this type of document. |
| Commenting on other pages |
![]() |
| Frames can be used to add your commentary to other pages and thread them into the link structure of your document. In the example here, we have a page on the right from the Internet talking about frames (Jakob Nielsen's article) and a few of our comments on the left. Even though the article is long, you can keep the comments in view as you scroll. Another example would be a trip report with framed pages that contain pages from the web sites of the companies visited along with comments. |
| Another, different, example is Tim Bray's annotated XML spec (http://www.xml.com/axml/testaxml.htm). The main body has links to "footnotes" that are targeted to another frame. See also the Independent Counsel's Report sample for another use of frames for footnotes. |
| Tours |
![]() |
| Tours are a special variant of commenting where you have linear paths through nonlinear (i.e., linked, web) documents or sites. For example, a human resources Intranet web site could have a tour of the pages of interest to new employees and another tour for employees with new dependents. Each "stop" on a tour would have explanatory material telling what is special about the page being shown, how it relates to other pages, where you can go from there, etc. |
| Tours are used on the Good Documents web site to explain the characteristics of sample documents in the Samples section. For example, there is a tour of "Status report with presentation" sample. |
| Make Pages Bookmarkable: Pages that are constructed of frames should be made bookmarkable whenever possible, except in special situations such as those discussed below. This means using separate framesets and always using TARGET="_top" in links. |
| Few scrollbars: Try to design the pages so that they look like they aren't framed to the untrained eye; the scrollbar should fit right in. This often means keeping the amount of material in all but one frame small enough to keep from displaying scrollbars. A reasonable design goal would be to have no more than one frame with scrollbars. |
| "You Are Here" in navigation areas: Groups of links (text or images) that include the current page should indicate which page is currently being viewed. Being able to navigate directly to the other choices by clicking on the representation in the group is an important added plus. The examples cited here show a variety of methods for doing this. |
| Don't use "shell navigation": Do not use one frameset file to hold a whole site or document. Avoid using the TARGET attribute without the "_top" value so that your document seems to be one URL. |
| Don't unknowingly use techniques that aren't bookmarkable: When in doubt, check. |
| Don't forget "You Are Here" indication: It is best to give readers a sense of where they are in a larger whole. Just using the name of where you are may not be enough: You may need to list the other possibilities and highlight the one chosen, such as through text or image button bars. |
| Don't have big areas that the reader doesn't want that don't scroll: The use of banners, logos, and advertisements that take up large amounts of space should be minimized. Space used for design purposes, such as to keep text columns narrow enough for easy reading, may be OK; check your readers' reactions. |
| Don't have too many scrollbars: They waste space, look bad, and are confusing. They are a last resort when the reader's screen is smaller than you planned. |
| Don't make things complicated or distracting: Keep animated GIFs and checkerboards of cute scrolling frames out of your document unless you want to give the reader something with which to waste their time. Some examples on the Frame Haters' sites are like games with several scrolling areas waiting for you to scroll down and find out what's there. Avoid this look. |
| Documents whose internal links constantly change so bookmarks will break, such as a "What's Special Today" document with descriptions of the special deals that change daily. |
| Documents where the first page has special, perhaps changing information that must be read before reading further, such as legal notices on "forward-looking statements" from public companies or instructions where updates are done frequently and readers must be aware of changes. |
| Uses of frames where the combined pages really are like one page, including left-hand frames with links that target "#" NAME anchors in the scrolling body text, as shown in our anchors sample, or pages with multiple illustrations, as shown in our photo sample. |