The frameset document defines the frame layout. If doesn't show up in the browser window but instead contains the addresses of the documents that do show up in the browser window. The frameset document is a HTML document that doesn't have a BODY tag but instead contains the FRAMESET tag. Attributes for the FRAMESET tag include "cols" and "rows". These attributes determine how the window is divided into frames. In this simple example the window is divided vertically into two frames (left and right) using the "cols" attribute.
The FRAME tag is used to assign a document to the frames. Using the "name"attribute the frames are named "Index" and "Text" and a HTML document is assigned to each frame. The functional design of this frame environment is for the frame on the left to work as an link index for the material that is displayed in the right frame.
Here is the framesetter document for the first frame example in this lesson:
<HTML>
<HEAD>
<TITLE>Frames 'R Us</TITLE>
</HEAD>
<FRAMESET COLS="26%, *">
<FRAME SRC="Frame_index.html" name="Index">
<FRAME SRC="Frame_text.html#top" name="Text">
<NOFRAME>
<FRAME SRC="Frame_text.html">
</NOFRAME>
</FRAMESET>
</HTML>
Notice the cols attribute contains the value "26%, *". This will create two frames, the first frame is 26% of the window's width (26%), the second frame's width is whatever is left over (*), in this case 74%. The name of each frame is defined within the FRAME tag. These names are used later to specify a target for links. The NOFRAME tag allows you to assign a web address to use in case someone is using a browser that can't display frames.
We'll examine all of the documents needed in this frame environment before taking a look at the example.