Latest web development tutorials

HTML <frameset> tag

Examples

Simple three-page framework:

<frameset cols="25%,*,25%">
  <frame src="frame_a.htm">
  <frame src="frame_b.htm">
  <frame src="frame_c.htm">
</frameset>

try it"
(For more examples, see the bottom of the page)

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the <frameset> tag.


Tag definitions and instructions

HTML5 does not support the <frameset> tag.

<Frameset> tag defines a framework set.

<frameset> element is used to organize one or more <frame> element. Each <frame> have a separate document.

<Frameset> element specifies how many columns exist in the framework of centralized or how many rows and each row and column occupancy percentage / pixels.

Note: If you want to verify that the page contains frames, make sure that the <DOCTYPE!> Is set to "HTML Frameset DTD" or "XHTML Frameset DTD".


Differences between HTML and XHTML

no.


Optional attributes

属性 描述
cols pixels
%
*
HTML5 不支持。规定框架集中列的数目和尺寸。
rows pixels
%
*
HTML5 不支持。规定框架集中行的数目和尺寸。


Standard property

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

属性 描述
class classname 规定元素的类名
id id 规定元素的唯一 id
style style_definition 规定元素的行内样式
title text 规定元素的额外信息

For a full description, go to Standard property .


Event Properties

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

属性 描述
onload script 当文档被载入时执行脚本
onunload script 当文档被卸下时执行脚本

For a full description, go to Event Attributes .


Examples

Try - Example

Horizontal frame
This example demonstrates: how to use three different document production a horizontal frame.

Mixed framework
This example demonstrates how to create a frame containing three documents, while mixing them placed among the rows and columns.

Containing noresize = "noresize" frame structure property
This example demonstrates noresize property. In this case, the frame can not be resized. On the border between the frame and drag the mouse, you will find that the border can not be moved.


related articles

HTML DOM Reference: Frameset objects