Main Index |
Top Of Tree |
Tag Index |
Tag History
- What is it?
- This tag represents the meta structure of a document using frames.
By replacing the BODY tag in the tag document structure, the FRAMESET tag
defines the document appearance in terms of regions of the screen
containing sub-document URLs which are the frame content.
Each FRAMESET tag consists of either a ROWS or COLS attribute defining a
row or column of the screen. Since only a row or column can be specified
at one time, nested FRAMESET tags with the opposite specification to the
parent FRAMESET may be added to sub-divide the structure into smaller
units [these are placed where a corresponding FRAME tag document reference
would be placed.]
If no ROWS or COLS attributes are present in a FRAMESET tag, it is
interpreted as a single row arbitrarily sized to fit the current window.
The * character used below in the ROWS and COLS
attributes deserves some explanation, as its use in this situation is unique
in HTML. By itself, the * character specifies
that any remaining frame width be devoted to the current frame. If there are
multiple frames in the Rows specification that have the
* character, remaining space will be divided
evenly between them. If the * character is
preceded by an integer (N), that frame will
receive N times as much of the remaining
relative sized space as it would without the N
prefix.
- Attributes
- Border
- 2 | 3
| 3.2 | IE
| M | N3B5
- Required? No
- Description:
This attribute is used in the outermost FRAMESET tag to globally set
the border thickness for all frames within the FRAMESET.
- Values:
Positive integers representing the pixel space between frames.
If BORDER=0 is used, it implicitly sets
FRAMEBORDER to No.
- BorderColor
- 2 | 3
| 3.2 | IE
| M | N3B5
- Required? No
- Description:
When this attribute is used in the FRAMESET tag, it attempts to set the
colors of all borders for all frames in the frameset. This can be
overridden on a frame-by-frame basis in the FRAME tag.
- Values: Either an
RGB triplet or a special
Color name.
- Cols
- 2 | 3
| 3.2 | IE3A1
| M3B2 | N2
- Required? No
- Description:
This attribute specifies that the current window will be sub-divided
into columns (vertical bands of framed content.) Values to this attribute
are separated by commas, and represent the horizontal widths of the
resultant separate child frames in the current parent frameset. In theory,
all values listed should account for, or sum up to, the full parent frame
size. It is possible to abuse this, because the three types of values
can be freely intermixed.
- Values:
Specified in
pixels, a percentage of parent frame width
(%) or in a dynamic relative sizing
attribute specified by the use of the *
character.
- FrameBorder
- 2 | 3
| 3.2 | IE3A1
| M | N3B5
- Required? No
- Description:
This attribute gives the author the option of whether or not to have
borders around all the frames in the FRAMESET. This value can
be overriden locally at the FRAME level.
- Values:
Netscape lists values
for this attribute as Yes [default] and
No.
Internet Explorer lists values of
1 [default] and
0 [display no border.]
- FrameSpacing
- 2 | 3
| 3.2 | IE3A1
| M | N
- Required? No
- Description:
This attribute gives the author the option of whether or not to have
borders around all the frames in the FRAMESET. This value can
be overriden locally at the FRAME level.
- Values:
Positive integers representing the pixel space between frames.
- Rows
- 2 | 3
| 3.2 | IE3A1
| M3B2 | N2
- Required? No
- Description:
This attribute specifies that the current window will be sub-divided
into rows (horizontal bands of framed content.) Values to this
attribute are separated by commas, and represent the vertical height
of the resultant separate child frames in the current parent frameset.
In theory, all values listed should account for, or sum up to, the full
parent frame size. It is possible to abuse this, because the three
types of values can be freely intermixed.
- Values:
Specified in
pixels, a percentage of parent frame
height (%) or in a dynamic relative
sizing attribute specified by the use of the *
character.
Event Handler Attributes
- [For more information on Event Handlers, please see the tag page for
SCRIPT.]
- onLoad
- 2 | 3
| 3.2 | IE3B1
| M | N2B3
- Required? No
- Description:
This attribute executes Script code with the completion of a window's
loading or when all frames within a Frameset have finished loading. In
a Frame document scenario, an onLoad event in the BODY tag of a sub-frame
will occur before an onLoad event within the parent FRAMESET tag.
- onUnload
- 2 | 3
| 3.2 | IE3B1
| M | N2B3
- Required? No
- Description:
An onUnload Event Handler executes Script code when the user exits a
document. In a Frame document scenario, an onUnload event in the BODY
tag of a sub-frame will occur before an onUnload event within the
parent FRAMESET tag.
- Example
- <html>
<head>
<title>Frames
Example</title>
</head>
<frameset ROWS="20,25%,*">
<frame SRC="frame1.html"
NAME="frame1">
<frame SRC="frame2.html"
NAME="frame2">
<frameset COLS="30%,*">
<frame SRC="frame3.html" NAME="frame3">
<frame SRC="frame4.html" NAME="frame4">
</frameset>
<noframes>
<body>
This text
will appear only if the browser does not support frames.
<body>
</noframes>
</frameset>
</html>
- Parent Model
- <frameset> |
<html>
- Content Model
- <frame> |
<frameset> |
<noframes>
Tips & Tricks
- There are many readers out there who do not like frames. Keep this in mind when
authoring your pages.
- Seriously consider the reasons WHY you want to author a page using
frames. Using frames can involve a costly amount of repetitive
downloads that a user could quickly tire of.
- Good situations to use frames:
Elements that the User Should Always See.
Things such as control bars, copyright notices, and title graphics can be
placed in a static, individual frame.
Table of Contents.
One frame can contain an index that, when clicked, displays results in an
adjoining frame.
Question and Answer.
Frames design allows queries to be posed and answered on the same page, with
one frame holding the query form, and the other presenting the results.
- It is STRONGLY recommended to include alternate body content
in the NOFRAMES section of a frames definition document. Even if the content
is a link to a non-framed version of the page, this provides users of frames
incapable browsers the chance to view the content of your site.
- It is easy to abuse any of the methods of specifying frame sizes to allow
dimensions that are not equal to the parent frame size (while this can be harmless,
it could cause display problems.)
- A Frequently Asked Question about Frames authoring:
How do I cause a hyperlink to update multiple
frames?
It is possible to do with just HTML, but it can become complex very quickly. If
you need to update multiple frames, define the group of multiple frames that you
want to update simultaneously as a single frame. The URL of that frame will be
yet ANOTHER frameset. When it comes time to do an action that will affect multiple
frames, call the action with the TARGET being the FRAME NAME for the group. This
update will probably need to call another destination URL that is also a FRAMESET
definition page. Note: This works easiest when the multiple frames that need
updating are adjacent or easily defined by a single FRAMESET tag. This method
does NOT work as well for pages that need to update multiple times.
Browser Peculiarities
- Netscape does not allow recursive FRAMESET calls to any parent document structure.
It is unknown if Mosaic or Internet Explorer also do this.
- Anecdote: A security hole was found in early Netscape implementations where an
author could specify a fairly invisible 1 pixel frame that could keep track of
all sites the user visited.
- Internet Explorer seems to be much more stringent in parsing correct frames
document syntax. If your documents work fine under Netscape, it won't hurt
to re-check the behavior under Internet Explorer.
- Netscape uses the BORDER attribute to control the frame border size
while Internet Explorer uses the FRAMESPACING attribute to control the
same behavior. It should be safe to use both of these attributes at the
same time to insure proper display on both of these browsers.
Boring Copyright Stuff...