HTML frameset Tag

HTML <frameset> Tag: The HTML<frameset> tag specifies a frameset. This HTML frameset tag holds one or more <frame> elements. The <frameset> element contains one or more frame elements. It is used to specify the number of row and column in a frameset with their pixel of spaces. Each element can hold a separate document.

HTML <frameset> Tag

Syntax: <frameset cols = “pixels|%|*”>

Attributes

The list of frameset attributes are given below:

  • cols: The cols attribute is used to create vertical frames in a web browser. This attribute is basically used to define the no of columns and its size inside the frameset tag.
  • rows: The rows attribute is used to create horizontal frames in a web browser. This attribute is used to define no of rows and its size inside the frameset tag.
  • border: This attribute of the frameset tag defines the width of the border of each frame in pixels. Zero value is used for no border.
  • frameborder: This attribute of frameset tag is used to specify whether the three-dimensional border should be displayed between the frames or not for this use two values 0 and 1, where 0 defines for no border and value 1 signifies for yes there will be a border.
  • framespacing: This attribute of the frameset tag is used to specify the amount of spacing between the frames in a frameset. This can take any integer value as a parameter which basically denotes the value in pixel.

Browser compatability

The HTML<frameset> tag is supported by different types of browsers.

  • Chrome
  • Firefox
  • Opera
  • Safari
  • Internet Explorer

Example:

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

Output:

HTML frameset tag

Attributes that are supported by the <frameset> tag

Attribute Value Description
cols pixels
%
*
Specifies the number and size of columns in a frameset
rows pixels
%
*
Specifies the number and size of rows in a frameset