next up previous
Next: Frame Layout Up: Frames Previous: What is a Frame?

Frame Tags

Netscape uses three new HTML tags to comprise the frame document: frameset, frame, and noframes.

A <FRAMESET> is simply the collection of frames that make up the browser's window. Column (COLS) and row (ROWS attributes for the frameset tag let you define the number and initial sizes for the columns and rows of frames.

The <FRAMESET> tag replaces the <BODY> tag THEY MUST NOT BE MIXED.

The <FRAME> tag defines what document--HTML or otherwise--initially goes into the frames within those framesets, and is where you may give the frame a name to use for document hypertext links.

Here is the HTML source that generated the six frame Web page above:

<html>
<head>
<title>Frames Layout</title>
</head>
<frameset rows="60%,*" cols="65%,20%,*">
  <frame src="frame1.html">
  <frame src="frame2.html">
  <frame src="frame3.html" name="fill_me">
  <frame scrolling=yes src="frame4.html">
  <frame src="frame5.html">
  <frame src="frame6.html">
  <noframes>
    Sorry, this document can be viewed only 
    with Netscape Navigator version 2.0 
    or later.
    <a href = "frame1.html">Take this link</a>
    to the first HTML document in the set.
  </noframes>
</frameset>
</html>




To see this frame working for real click here.


Notice a few things in the simple frame example

For instance, to link a document called ``new.html'' for display in our example window frame 3, which we've named ``fill_me'', the anchor looks like this:

<a href="new.html" target="fill_me">.....</a>
If the Netscape browser user chooses the link, say in frame 1, the new.html document will replace the original frame3.html contents in frame three.




To see this working for real click here.

Click on the link in Frame 1 and watch Frame 3 change.


Since Netscape is the only browser that supports frames, it is likely that some other browser users will try and view your frame documents. That's why each of your key frame documents should provide a backdoor to your HTML document collection with the <NOFRAMES> tag.


next up previous
Next: Frame Layout Up: Frames Previous: What is a Frame?
Dave Marshall
9/28/2001