Полезная информация

HTML: The Definitive Guide

Previous Chapter 12 Next
 

12. Frames

Contents:
An Overview of Frames
Frame Tags
Frame Layout
Frame Contents
The <noframes> Tag
Inline Frames
Named Frame or Window Targets

Beginning with Netscape Navigator 2.0, HTML authors have been able to divide the browser's main display window into independent window frames, each simultaneously displaying a different document--something like a wall of monitors in a TV control room. Instantly popular, frames were soon adopted (and extended) by Microsoft for Internet Explorer, although they have not been incorporated into the HTML 3.2 standard.

Since everything discussed in this chapter is an extension to HTML 3.2, we'll dispense with our normal "extension" notation and denote only those attributes and tags that are unique to Netscape or Internet Explorer. Otherwise, be aware that all tags and attributes discussed herein, although supported by both browsers, nonetheless are extensions and not standard components of HTML.

12.1 An Overview of Frames

Figure 12.1 is a simple example of a frame display. It shows how the document window may be divided into columns and rows of individual frames separated by rules and scroll bars. Although it is not immediately apparent in the example, each frame in the window is displaying an independent document. We use different HTML documents in the example, but the individual documents may contain any valid content the browser is capable of displaying, including multimedia. If the frame's contents include a hyperlink the user selects, the new document's contents, even another frame document, may replace that same frame, another frame's content, or the entire browser window.

Figure 12.1: A simple six-panel frame layout for Netscape

[Graphic: Figure 12-1]

You enable frames with a special frame document. Its contents do not get displayed. Rather, the frame document contains extension HTML tags that tell the browser how to divide its main display window into discrete frames, and what documents go inside the frames.

The individual documents referenced and displayed in the frame document window act independently, to a degree; the frame document controls the entire window. You can, however, direct one frame's document to load new content into another frame. That's done by attaching a name to a frame and targeting the named frame with a special attribute for the hyperlink <a> tag.


Previous Home Next
Beyond Ordinary Tables Book Index Frame Tags

HTML: The Definitive Guide CGI Programming JavaScript: The Definitive Guide Programming Perl WebMaster in a Nutshell