What Does It Take to Make a Frames Page?

What Does It Take to Make a Frames Page?

In a frame-based page, the content of each frame is contained in a separate HTML page (see Figure 27.1). If the page features three frames, it has at least three separate HTML files, one to appear in each frame.

In addition to those "content" HTML files, another HTML file ties all the others togetherthe frame definition page.

The frame definition page is a special HTML file that creates and controls a frame-based Web page. The file contains the filename of the HTML file that's to be displayed in each frame, plus tags dictating the number and size of the frames.

Creating a frame-based page requires three basic steps:

  1. Create the various individual HTML pages to be displayed within the frames.

  2. Create the frame definition page to define the number, size, and other aspects of the frames.

  3. Tie one HTML file to each frame.


When publishing and publicizing your frame-based page, you direct visitors to the frame definition page, not to any of the content files displayed within the frames.

The Frame Definition Page

The frame definition page supplies no content to the page; it merely specifies how the page will be split up and which HTML page will be displayed in each frame.

In Figure 27.1, the URL shown in the address box is that of the frame definition page; that's the URL a visitor accesses to open the page. The frame definition page then takes care of displaying the pages within the frames.


In the frame definition page, you can insert a message to be displayed only to visitors who can't see links. (See the section "Accommodating the Frame-Intolerant," later in this chapter.)

The Frame Content

A separate HTML file, which you compose like any other Web page, supplies the content of each frame. You create and format these pages like any other Web page file; however, when composing files to be displayed in frames, you must try to account for the size and shape of the frame in which you plan to display it.)

Browsers help adjust content for frames: They automatically shorten horizontal lines and wrap text to fit within a frame. Alignment properties are also preserved in a frame; for example, if your text is centered in the page when you compose it, the browser centers the text within the frame when displaying it. However, browsers cannot adjust the positions or spacing of images (or images used as rules or bullets); images often make framing difficult.


Note that each page in a frame can have its own, unique background image or color , defined in the content file.

Frames are not created in Composer, but you can create your content files in Composer and tie them together under a frame definition page you create with HTML or another tool (as you do in the next example) and then check your work by previewing the page in Netscape or another browser.

Browsers automatically add scrollbars to a frame when the contents exceed the frame size. But a frames page showing a collection of fragmentary files and scrollbars is unappealing, and visitors tire quickly of excessive scrolling especially horizontal scrolling to read wide text. Whenever practical, make the content fit the frameor vice versa.

Sams Teach Yourself Internet and Web Basics All in One
Sams Teach Yourself Internet and Web Basics All in One
ISBN: 0672325330
EAN: 2147483647
Year: 2003
Pages: 350
Authors: Ned Snell

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net