Frames: HTML
Create a Simple Frameset
| The Simple Frameset | One of the simplest types of framed web documents uses
a newspaper-style layout.
In such a document are three frames:
|
|||||
|
||||||
| Before you create your frameset document, sketch out the
layout of your frames page.
Then create a few files that will go into your frames. For the example above I might create the following web pages:
Note that in this case both default and pagetwo are meant to appear in the larger frame in the lower right column. |
||||||
| To create a framed web document, first create a frameset
document.
This frameset document is actually a blank page. It contains no content, only instructions for the frames that will be displayed. Each frame will contain a body document, i.e., a normal web page. |
||||||
To create a frameset document,
|
||||||
|
||||||
| Here, with annotations, is the HTML for
the frameset document:
<HTML> |
||||||
| NOTE: So far this code is the same as it would be for a normal web page. | ||||||
| <FRAMESET ROWS="15%,
85%">
NOTE: We replace the opening <BODY> tag with the opening <FRAMESET> tag. We use the ROWS attribute to indicate that we want two frames, one below the other. The first row (i.e., the banner) will take up 15% of the screen; the second row will take up 85% of the screen. |
|
|||||
| <FRAME NAME="banner"
SRC="banner.htm">
NOTE: We name the first frame banner. We then use the SRC attribute and specify the file that will go into that frame. |
||||||
| <FRAMESET COLS="25%,75%">
<FRAME NAME ="toc" SRC="toc.htm"> <FRAME
NAME="main" SRC="default.htm">
NOTE: We now divide the second frame into two columns; the first column (i.e., the table of contents) will take up 25% of the screen; the second column will take up 75% of the screen |
||||||
| </FRAMESET> </FRAMESET> NOTE: We close the second frameset. Then we close the first frameset. </HTML> Finally we close the document. |
|
|||||
Frames: HTML
Overview
Create a Simple Frameset
Create Hyperlinks Between Frames
Web Design Center
Last Revised:
October 19, 2006
© Agatha Taormina