4.3. The <frame> Tag
document contains no displayable content (except for the contents of
the <noframes> tag, if applicable). The
<frame> tags provide URL references to the
individual documents that occupy each frame.
<frame> tags are standalone elements, and
therefore do not require a closing tag.
Frames are placed into a frameset column by column, from left to
right, and then row by row, from top to bottom—so the sequence
and number of <frame> tags inside a
<frameset> are important.
Netscape displays empty frames for <frame>
tags that do not contain an src document attribute
and for those trailing ones in a frameset that do not have an
associated <frame> tag. Such orphans,
however, remain empty; you cannot put content into them later, even
if they have a target name attribute for display
Listed below are the basic attributes that can be used in the
The value of the src
attribute is a URL of the document that is to be displayed in the
frame. The document may be any valid HTML document or displayable
object, including images and multimedia. The referenced document may
itself be another frame document.
The optional name
attribute labels the frame for later reference by a
target attribute in a hypertext link anchor
<a> tag. If a link that targets a
frame's name is selected, the document is displayed
in the named frame. The value of the name
attribute is a text string enclosed in quotes.
Even though you may explicitly
set their dimensions with attributes in the
<frameset> tag, users can manually alter the
size of a column or row of frames. To suppress this behavior, add the
noresize attribute to the frame tags in the row or
column whose relative dimensions you want to maintain.
Normally, the browser displays vertical
and horizontal scrollbars for frames whose contents exceed the
allotted space. If there is sufficient room for the content, no
scrollbars appear. The scrolling attribute gives
you explicit control over whether scrollbars appear. A value of
yes turns the scrollbars on; no
turns them off. The value of auto gives the
default scrollbar behavior and is the same as not using the
scrolling attribute at all.
The browser normally places a small
amount of space between the edge of a frame and its contents. Those
margins can be manually set with the marginheight
and marginwidth attributes, whose values are given
in pixels. A margin cannot be less than one pixel, nor so big that
there is no room left for the frame's contents.
|4.2. Nested Framesets||4.4. Frame Targets|
Copyright © 2003 O'Reilly & Associates. All rights reserved.