<frameset> (Frameset Definition)
This element is used to define the organization of a set of independent window regions known as frames as defined by the <frame> element. This element replaces the <body> element in framing documents.
Syntax (Transitional Only)
cols="list of columns"
id="unique alphanumeric identifier"
rows="list of rows"
Attributes Defined by Internet Explorer
bordercolor="color name | #RRGGBB" (4)
frameborder="no | yes | 0 | 1" (4)
lang="language code" (4)
hidefocus="true | false" (5.5)
unselectable="on | off" (5.5)
Events Defined by Internet Explorer
onactivate, onafterprint, onbeforedeactivate, onbeforeprint, onbeforeunload, onblur, oncontrolselect, ondeactivate, onfocus, onmove, onmoveend, onmovestart, onresizeend, onresizestart
Element Specific Attributes
- This attribute sets the width in pixels of frame borders within the frame set. Setting border="0" eliminates all frame borders. This attribute is not defined in the HTML specification but is widely supported.
- This attribute sets the color for frame borders within the frame set using either a named color or a color specified in the hexadecimal #RRGGBB format.
- This attribute contains a comma-delimited list, which specifies the number and size of columns contained within a set of frames. List items indicate columns from left to right. Column size is specified in three formats, which might be mixed. A column can be assigned a fixed width in pixels. It also can be assigned a percentage of the available width, such as 50 percent. Finally, a column can be set to expand to fill the available space by setting the value to *, which acts as a wildcard.
- This attribute controls whether or not frame borders should be displayed. Netscape supports no and yes values. Microsoft uses 1 and 0 as well as no and yes.
- This attribute indicates the space between frames in pixels.
- This attribute contains a comma-delimited list, which specifies the number and size of rows contained within a set of frames. The number of entries in the list indicates the number of rows. Row size is specified with the same formats used for columns.
<!-- This example defines a frame set of three columns. The middle column is 50 pixels wide. The first and last columns fill the remaining space. The last column takes twice as much space as the first. -->
<!-- This example defines a frame set of two columns, one of which is 20% of the screen, and the other, 80%. -->
<frameset cols="20%, 80%">
<!-- This example defines two rows, one of which is 10% of the screen, and the other, whatever space is left. -->
<frameset rows="10%, *">
<frame src="adbanner.htm" name="ad_frame">
<frame src="contents.htm" name="content_frame">
HTML 4 and 4.01 (frameset DTD), XHTML 1.0 (frameset DTD)
Internet Explorer 2, 3, 4, 5, 5.5, 6
Netscape 2, 3, 4, 4.5-4.8, 6, 7
The content model says that the <frameset> tag contains one or more <frame> tags, which are used to indicate the framed contents. A <frameset> tag also might contain a <noframes> tag whose contents will be displayed by browsers that do not support frames.
The <frameset> element replaces the <body> element in a framing document as shown here:
<title>Collection of Frames</title>
<frame src="column1.htm" name="col1">
<frame src="column2.htm" name="col2">
<frame src="column3.htm" name="col3">
Please visit our <a href"noframes.htm">no frames</a> site.