English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML reference manual

HTML tag大全

HTML: <frameset> tag

The <frameset> is an HTML element used to contain <frame>. Note: It is now not encouraged to use frame, instead use <iframe>. Most websites today do not use frame.

Online example

Simple three-frame page:

<!DOCTYPE html>
<html>
<frameset cols="25,%*,25%>
  <frame src="sun.html">
  <frame src="venus.html">
  <frame src="mercur.html">
</frameset>
</html>
Test and see ‹/›

Browser support

IEFirefoxOperaChromeSafari

All mainstream browsers support the <frameset> tag

Tag definition and usage instructions

HTML5 The <frameset> tag is not supported.

The <frameset> tag defines a frameset.

The <frameset> element is used to organize one or more <frame> elements. Each <frame> has its own independent document.

The <frameset> element specifies how many columns or rows are present in the frame set, as well as the percentage occupied by each row and column/pixels.

Note:If you want to validate a page containing frames, make sure that <!DOCTYPE> Set to "HTML Frameset DTD" or "XHTML Frameset DTD".

Optional attributes

AttributeValueDescription
colspixels
     %
     *
HTML5 Not supported.Specifies the number of columns and dimensions in the frame set.
rowspixels
     %
     *
HTML5 Not supported.Specifies the number of rows and dimensions in the frame set.

Standard Attributes

In HTML 4.01 The <frameset> tag supports the following standard attributes:

AttributeValueDescription
classclassnameSpecify the class name of the element
ididSpecify the unique id of the element
stylestyle_definitionSpecify the inline style of the element
titletextSpecify additional information about the element

For a complete description, please visitStandard Attributes.


Event Attributes

In HTML 4.01 In, the <frameset> tag supports the following event attributes:

AttributeValueDescription
onloadscriptExecute script when the document is loaded
onunloadscriptExecute script when the document is unloaded

For a complete description, please visitEvent Attributes.


Try the online example

Horizontal Frame
This example demonstrates: how to create a horizontal frame using three different documents.

Mixed Structure Frame
This example demonstrates how to create a frame structure with three documents, mixing them in rows and columns.

Frame structure with noresize="noresize" attribute
This example demonstrates the noresize attribute. In this example, the frames are not resizable. Dragging the mouse over the frame borders will show that the borders cannot be moved.

Related Articles

HTML DOM Reference Manual: Frameset Object