HTML frameset Tag

  • HTML <frameset> tag used to holds one or more <frame> elements.

  • The <frameset> tag split the browser window in several individual frames that can contain a separate HTML web document.

  • HTML <frameset> tag remove in HTML5 specification.

Example

frame_1.html
<html>
<body style="background-color:#ff9900;">
  <h2 align="center">First frame (frame_1.html)</h2>
</body>
</html>

frame_2.html
<html>
<body style="background-color:#ffcc00;">
  <h2 align="center">Second frame (frame_2.html)</h2>
</body>
</html>

frame_example1.html
<html>
<head>
  <title>Frameset Example 1<title>
</head>
<frameset rows="35%, 65%">
  <frame src ="frame_1.html" />
  <frame src ="frame_2.html" />
</frameset>
</html>

Run it...   »

<frameset> Tag Attributes

HTML <frameset> tag support following specific attributes. All following attributes has been removed in HTML5.

Attributes Value Description
cols *
%
pixels
Specifies the number of columns and their width in a frameset.
Default value is 100%.
*: Allocated remaining size of the window. Eg. Create two vertical frames, use cols="35%, *". Here * will takes remaining size of the window.
rows *
%
pixels
Specifies the number of rows and their height in a frameset.
Default value is 100%.
*: Allocated remaining size of the window. Eg. Create two horizontal frames, use cols="40%, *". Here * will takes remaining size of the window.

Global Attributes

HTML <frameset> tag support following global attributes.

Attributes Value Description
id unique_name Declared unique id for an element.
class class_name Declared one or more classnames for an element.
style styles CSS inline styles specify an element.
title title Specify extra details of element contain, this will display as a "tooltip" for an elements.

Event Attributes

HTML <frameset> tag does not support any event attributes.

Browser Compatibility

  • Google Chrome
    Yes
  • Mozilla Firefox
    Yes
  • Microsoft Edge
    Yes
  • Opera
    Yes
  • Safari
    Yes