|
HTML Frames Basics
By Stephen Bucaro
A frame creates a separate pane within the browser window. A frame can
contain its own webpage, or it can provide a different view of the same webpage
in another frame in the same browser window. A frame may have a border, or be
borderless. A frame may or may not have scrollbars. A frame may or may not be resizable.

A frame is always contained within a frameset which may contain one or
more frames. The frameset shown above contains three frames, the menu and
content area frames are within one frameset which is nested along with the header
frame inside a second frameset. The code for this example is shown below.
<html>
<head>
<title>Amendments to the Constitution</title>
</head>
<frameset rows="110, *">
<frame src="header.htm">
<frameset cols="120, *">
<frame src="menu.htm">
<frame name="content" src="content1.htm">
</frameset>
</frameset>
</html>
The <frame> tag defines a frame within a <frameset>. A frame may
have the following attributes:
| Attribute | Description |
| src | URL of the document to be displayed in the frame |
| name | Name used for TARGET attribute in <a href> links |
| frameborder | Whether to display a border, 1=yes or 0=no |
| framespacing | Space between frames, in pixels |
| marginwidth | Size of left and right margins, in pixels |
| marginheight | Size of top and bottom margins, in pixels |
| scrolling | Defines scrolling, values are yes, no and auto |
| noresize | Prevents user from resizing the frame |
|