A web page that is divided into frames is held together by a top-level frameset document.
Frameset documents are fundamentally different from other HTML
documents in that they use the
element instead of a
<body> element. The
frameset element may not contain any content, but instead it defines
and names some number of frames, arranged in rows and/or columns.
Each frame is indicated with a
<frameset>. A frameset document
contains a standard header portion (as indicated with the
Figure 14-1 shows the structure of a basic frameset document that creates two frames, occupying two columns of equal width.
Figure 14-1. Basic frameset document
The contents of framed documents come from separate HTML files that are displayed within each frame. For example, in Figure 14-1, the content that appears in the left frame is a standard HTML file called left.html. The samples throughout this chapter reference simple HTML documents similar to left.html, shown here:
<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
the frames (borders are discussed later in this chapter.)
At the frame level (within the
<frame> tag), ...