Last Updated : 11 Jul, 2025
The HTML <frameset> tag was used in older versions of HTML to create multi-pane layouts within a web page. By dividing the browser window into multiple sections, each frame could display a separate HTML document. This allowed for the creation of complex web layouts with different content in each pane.
What to Use Instead of Frameset?Note: The <frameset> tag is deprecated in HTML5 and is no longer supported in modern web development.
Instead, more responsive and accessible layout techniques such as CSS Grid and Flexbox are recommended.
Syntax<frameset cols="pixels|%|*"> <!-- Define frames here --> </frameset>Attributes
The list of frameset attributes is given below:
Attribute Description cols Defines the number of columns and their size within the frameset tag, creating vertical frames in the web browser. rows Defines the number of rows and their size within the frameset tag, creating horizontal frames in the web browser. border Specifies the width of the border of each frame in pixels. A value of 0 indicates no border. frameborder Specifies whether a three-dimensional border should be displayed between frames. Values: 0 (no border) or 1 (border). framespacing Specifies the amount of spacing between frames in a frameset, denoted in pixels. Examples of the <frameset> Element in HTMLLet's look at how the <frameset> tag can be used to create both horizontal and vertical frames.
Example 1: In this example we defines a frameset with three rows, each displaying different content from external sources. The frames provide structured layout, with a fallback message for browsers that don't support frames.
HTML
<!DOCTYPE html>
<html>
<head>
<title>frameset attribute</title>
</head>
<body>
<frameset cols="30%, 40%, 30%">
<frame name="top" src="attr1.png" />
<frame name="main" src="gradient3.png" />
<frame name="bottom" src="col_last.png" />
<noframes>
<body>The browser you are working does
not support frames.</body>
</noframes>
</frameset>
</body>
</html>
Output:
The above example basically used to create three horizontal frames: top, middle, and bottom using row attribute of frameset tag, and the noframe tag is used for that browser that doesn’t support noframe.
Example 2: In this example we defines a frameset with three columns, each displaying different content from external sources. A fallback message is provided for browsers that don't support frames.
<!DOCTYPE html>
<html>
<head>
<title>frameset attribute</title>
</head>
<body>
<frameset cols="30%, 40%, 30%">
<frame name="top" src="attr1.png" />
<frame name="main" src="gradient3.png" />
<frame name="bottom" src="col_last.png" />
<noframes>
<body>The browser you are working does
not support frames.</body>
</noframes>
</frameset>
</body>
</html>
Output:
The above example basically used to create three vertical frames: left, center, and right using col attribute of frameset tag.
Supported Browsers:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4