To create a page with frames, declare a frameset with the FRAMESET tag. The FRAMESET tag is an HTML tag element, like the BODY tag, and not part of the BODY tag. Inside the frameset, declare individual frames using the FRAME tag. For example:
<HTML>
<TITLE> Title </TITLE>
<FRAMESET FRAMESPACING=3 ROWS="50,*">
<!--
Two frames, each the width of the entire browser window (as opposed to columns)
The border between them will be 3 pixels wide.
The top frame will have a height of 50 pixels, the second will take up the remainder.
-->
<FRAME SRC="Top_frame_1.htm" NAME="top" NORESIZE SCROLLING="no">
<FRAME SRC="Bottom_frame_1.htm" NAME="bottom" NORESIZE>
</FRAMESET>
</HTML>
NORESIZE means that the frames have been locked.
| BORDER | Netscape 3 | Determines separation between the frames in a frameset |
| BORDERCOLOR | Netscape 3 | Determines border colour. |
| COLS | Determines size and number of frames as columns | |
| FRAMEBORDER | Determines presence of the frame border (yes/no). | |
| FRAMESPACING | IE 3 | Determines separation between the frames in the frameset. |
| ROWS | Determines size and number of frames as rows. |
Rows and columns can be specified as:
| Percentage of screen height | ROWS="20%" |
| Number of pixels | ROWS="200,*" |
| * meaning whatever is left | ROWS="200,*" |
| N - where n is a number, meaning 'n parts of what is left over'. | ROWS="*,2*" - first row is 1/3, second is 2/3. ROWS="100,2*,*" - first row is 100 pixels, second is 2/3 of what is left, third is 1/3 of what is left. |
Additional attributes of the FRAME tag:
| BORDER | Netscape 3 | Determines separation between the frames in a frameset |
| BORDERCOLOR | Netscape 3 | Determines border colour. |
| FRAMEBORDER | Determines presence of the frame border (yes/no). | |
| FRAMESPACING | IE 3 | Determines separation between the frames in the frameset. |
| NAME | Names a frame for use with TARGET attribute in a hyperlink. | |
| NORESIZE | Prevents resizing of the frame. | |
| SCROLLING | Determines whether or not the frame uses a scroll bar. Default is SCROLLING = YES. Use SCROLLING = NO to remove the scroll bar. | |
| SRC | Specifies the HTML document to be displayed in that frame. |
Attributes declared in the FRAME tag have precedence over attributes in the FRAMESET tag.
Note: The Netscape browsers do not always reload the FRAMESET attributes, so if reloading produces no change, open the file.
Frame borders
Back to top Home Serious Stuff
© 2001. Copyright Sue Nethercott.