English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
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.
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 ‹/›
IEFirefoxOperaChromeSafari
All mainstream browsers support the <frameset> tag
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".
Attribute | Value | Description |
---|---|---|
cols | pixels % * | HTML5 Not supported.Specifies the number of columns and dimensions in the frame set. |
rows | pixels % * | HTML5 Not supported.Specifies the number of rows and dimensions in the frame set. |
In HTML 4.01 The <frameset> tag supports the following standard attributes:
Attribute | Value | Description |
---|---|---|
class | classname | Specify the class name of the element |
id | id | Specify the unique id of the element |
style | style_definition | Specify the inline style of the element |
title | text | Specify additional information about the element |
For a complete description, please visitStandard Attributes.
In HTML 4.01 In, the <frameset> tag supports the following event attributes:
Attribute | Value | Description |
---|---|---|
onload | script | Execute script when the document is loaded |
onunload | script | Execute script when the document is unloaded |
For a complete description, please visitEvent Attributes.
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.
HTML DOM Reference Manual: Frameset Object