O'Reilly logo

Web Design in a Nutshell by Jennifer Niederst

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

Basic Frameset Structure

A web page that is divided into frames is held together by a top level frameset document.

A frameset document contains a standard header portion (as indicated with the <head> tag). However, unlike standard HTML documents, frameset documents do not have a <body>—instead, they contain a <frameset> tag, which is used to define columns and rows of individual frames (each indicated with a <frame> tag). Figure 11.1 shows the structure of a basic frameset document that creates two frames, occupying two columns of equal width.

Basic frameset document

Figure 11-1. Basic frameset document

The contents of framed documents come from separate HTML files that are displayed within each frame. For example, in Figure 11.1, the content that appears in the left frame is actually a standard HTML file called left.html. The samples throughout this chapter reference simple HTML documents similar to this one:

<HTML>
<HEAD><TITLE>Left Frame Contents</TITLE></HEAD> 
<BODY BGCOLOR="white">
This is the left frame.
</BODY>
</HTML>

At the frameset level (i.e., within the <frameset> opening tag), you establish the rows and columns and decide if you want borders to display between each frame (borders are discussed later in this chapter.)

At the frame level (within the <frame> tag), you identify the URL of the document to display in that frame and give the frame a name for future reference. You also have control over ...

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