Finding Out about Frames
Frames divide a browser window into several parts, just as a window (the glass kind) can be divided into several panes. Each frame (or pane) consists of an individual HTML document. In effect, using frames lets you put multiple separate HTML documents on a single page, each in an individual box.
You can use frames to create a variety of layouts. For example, you may have seen frames used as a navigational aid, such as a frame with links on the left side of the browser window.
After readers select a link from the left frame, the linked document appears in the right frame — thus the navigational features stay visible at all times.
You also may have seen frames used to help promote a corporate name or image. The logo and information, for example, appear in the top frame, and the linked documents appear in the bottom frame.
Think of these frames as being a two-column or two-row table. In these examples, the smaller of the two frames stays constant on the Web page (you can call this the navigation or banner document), whereas the larger frame changes to display various HTML documents in the site (consider these the content documents). The effect is that you can develop the banner or navigation document only one time, throw it in a frame, and then be done with it — not to mention that the frame can stay visible and fixed while other text within the same overall browser window moves.
You can provide more than two frames in a browser window, but that quickly becomes very complex for you, the author, and your readers. Two or (in extreme cases) three frames are plenty.
Frames do have a few disadvantages to consider. In particular, not all browsers can display them, and not all readers like them. That said, most browsers can display them. If you do them well, your readers can at least tolerate them, and they’re quite widespread. Heck, they became popular long before they became part of the HTML 4.0 specification.
Creating a framed site requires planning above all else. First, sit down and sketch out where your frames should go, and give them names. (No, not names like Joey and Sam.) Think up informative names such as “banner” and “body” or “index” and “text.” You should also note on your sketch which frame provides the navigation or banner page (and therefore stays constant) and which frame provides the content pages (and therefore changes). Planning this information now helps you develop content, set up the frames, and set up navigation between the frames.
After you finish the planning and sketching, you should complete the following steps:
1. Develop content for each frame.
2. Develop alternative content for browsers that can’t accommodate frames.
3. Establish the frameset document.
4. Set up the frames.
5. Target the frames.
6. Test them — extensively.
Because frames that contain corporate logos and navigation links remain visible most of the time, you need to make sure that they look good. You can use any colors and formatting that you’d use in other HTML documents in your framed documents. What’s more, you can be very sure that browsers that accommodate frames also accommodate the layout bells and whistles that you like.
Because not all browsers accommodate frames (and not all readers choose to display frames), you need to provide alternative content. This alternative content is similar to alternative text you include with images; this text appears in place of images in case your readers can’t or choose not to view your images.
In an ideal world, you could take the time to have two complete Web sites — one optimized for nonframed browsers and the other for framed browsers. Realistically, however, you’re not likely to have the time for this luxury because having two sites would double the time required to create and maintain them.
Instead, just make a single HTML document that includes all the corporate logos and links that your main frames have and make sure that you include links to all the other pages — the ones that also appear within the frames for the lucky readers. In this alternative content document, you can be as fancy as you want, but keep in mind that browsers that can accommodate cutting-edge formatting can also probably accommodate frames.