O'Reilly logo

HTML, XHTML, and CSS Bible, Fifth Edition by Steven M. Schafer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 10. Frames

IN THIS CHAPTER

  • Frames Overview

  • Framesets and Frame Documents

  • Targeting Links to Frames

  • Nested Framesets

  • Inline Frames

Several years ago, almost every document on the Web contained frames. The frameset structure provided an easy way to create multiple, separate scrolling areas in a user agent window and a flexible mechanism to modify the content of frames.

However, frames have turned out to be more of a fad. You can have many of the benefits provided by using frames through the infinitely more flexible and powerful CSS formatting methods.

That said, frames still have their uses and have even spawned their own official Document Type Definitions (DTDs) to handle their special tags and needs. This chapter introduces the concept of frames and shows you how to add them to your documents.

Frames Overview

At their simplest level, frames provide multiple separately scrollable areas within one user window. Many non-Web applications use the technique of separate panes to provide organization and controls. For example, Figure 10.1 shows Windows Explorer using the left panes to display Favorite Links and Folders, and the right pane to display files within the selected folder.

As you have no doubt noticed, the different panes in applications such as Windows Explorer can be manipulated separately from other panes. The same is true for documents utilizing frames.

For example, Figures 10.2 and 10.3 show the same document but the window in Figure 10.3 has been scrolled to view the bottom ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required