<td>One or more FRAMESET and <a href="frame.html">FRAME</a> elements, as well as an optional <a href="noframes.html">NOFRAMES</a></td>
</tr>
<tr valign=top>
<th>Contained in</th>
<td><a href="../html/html.html">HTML</a></td>
</tr>
</table>
<p>The <strong class=html>FRAMESET</strong> element is a <em>frame container</em> for dividing a window into rectangular subspaces called <em>frames</em>. In a <a href="../html/doctype.html#frameset">Frameset</a> document, the outermost <strong class=html>FRAMESET</strong> element takes the place of <strong class=html><a href="../html/body.html">BODY</a></strong> and immediately follows the <strong class=html><a href="../head/head.html">HEAD</a></strong>.</p>
<p>The <strong class=html>FRAMESET</strong> element contains one or more <strong class=html>FRAMESET</strong> or <strong class=html><a href="frame.html">FRAME</a></strong> elements, along with an optional <strong class=html><a href="noframes.html">NOFRAMES</a></strong> element to provide alternate content for browsers that do not support frames or have frames disabled. A meaningful <strong class=html>NOFRAMES</strong> element should always be provided and should at the very least contain links to the main frame or frames.</p>
<p>The <strong class=html>ROWS</strong> and <strong class=html>COLS</strong> attributes define the dimensions of each frame in the set. Each attribute takes a comma-separated list of lengths, specified in pixels, as a percentage, or as a relative length. A relative length is expressed as <strong class=html><var>i</var>*</strong> where <strong class=html><var>i</var></strong> is an integer. For example, a frameset defined with <strong class=html>ROWS="3*,*"</strong> (<strong class=html>*</strong> is equivalent to <strong class=html>1*</strong>) will have its first row allotted three times the height of the second row.</p>
<p>The values specified for the <strong class=html>ROWS</strong> attribute give the height of each row, from top to bottom. The <strong class=html>COLS</strong> attribute gives the width of each column from left to right. If <strong class=html>ROWS</strong> or <strong class=html>COLS</strong> is omitted, the implied value for the attribute is <strong class=html>100%</strong>. If both attributes are specified, a grid is defined and filled left-to-right then top-to-bottom.</p>
<p>The following example sets up a grid with two rows and three columns:</p>
<p>The next example features nested <strong class=html>FRAMESET</strong> elements to define two frames in the first row and one frame in the second row:</p>
<IMG SRC="ad.gif" ALT="Ad: Does your bank charge too much?">
</P>
</BODY>
</NOFRAMES>
<strong></FRAMESET></strong></code></pre>
<p class=note>When pixel lengths are used, they should always be combined with a relative length to handle various window sizes. Pixel lengths should only be used when the frame consists primarily of images or other objects with a fixed size in pixels. Due to their ability to adapt to different window sizes, percentages and relative lengths are generally preferred.</p>
<p>The <strong class=html>FRAMESET</strong> element also accepts <strong class=html>ONLOAD</strong> and <strong class=html>ONUNLOAD</strong> attributes to specify client-side scripting actions to perform when the frames have all been loaded or removed.</p>
<h2>More Information</h2>
<ul>
<li><a href="http://www.w3.org/TR/REC-html40/present/frames.html#edef-FRAMESET">FRAMESET in <abbr class=initialism title="World Wide Web Consortium">W3C</abbr> HTMLá4.0 Recommendation</a></li>
</ul>
<div class=footer>
<address>Maintained by <a href="http://www.htmlhelp.com/%7Eliam/">Liam Quinn</a> <<a href="mailto:liam@htmlhelp.com">liam@htmlhelp.com</a>></address>