NOTICE: This website is no longer updated or supported - as such many of the techniques used to build it may seem antiquated in the modern day. It is preserved for historical reasons only.

HTML XHTML The Complete Reference
home » reference » appendix a » html element reference

<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)

class="class name(s)"
cols="list of columns"
id="unique alphanumeric identifier"
rows="list of rows"
style="style information"
title="advisory text"


Attributes Defined by Internet Explorer

border="pixels" (4)
bordercolor="color name | #RRGGBB" (4)
frameborder="no | yes | 0 | 1" (4)
framespacing="pixels" (4)
lang="language code" (4)
language="javascript | jscript | vbs | vbscript" (4)
hidefocus="true | false" (5.5)
tabindex="number" (5.5)
unselectable="on | off" (5.5)

Standard Events

onload, onunload

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. -->

<frameset cols="*,50,*">
   <frame src="column1.htm">
   <frame src="column2.htm">
   <frame src="column3.htm">

<!-- 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%">
   <frame src="controls.htm">
   <frame src="display.htm">

<!-- 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
Opera 4-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:

Collection of Frames</title>

<frameset cols="*,50,*">
   <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.


(X)HTML Elements
CSS Properties
Previous: frame Next: h1-h6
< Home | About | Chapters | Examples | Errata | Reference | Site Map >