HTML Page Structure

HTML Elements
HTML Attributes


HTML FrameSet Tag

A Frameset is a collection of all the frames in a browser window. Browser's screen can be splitted into frames using HTML <frameset> tag.

Syntax

<frameset rows="20%,20%,60%">
   <frame name="X" src="../X_Frame.htm" />
   <frame name="Y" src="../Y_Frame.htm" />
   <frame name="Z" src="../Z_Frame.htm" />
</frameset>

HTML FrameSet Example

<!DOCTYPE html>
<html>
<head>
<title>My HTML Frame Tag Example</title>
</head>
<frameset rows="50%,50%">
   <frame name="X" src="html-phrase-tag-Live-Demo.php" />
   <frame name="Y" src="html-phrase-tag-Live-Demo.php" />
</frameset>
</body>
</html>

This will produce following result

Frame Attributes List

The below table contains HTML Frame Attributes and their description which is supported by HTML version.

Attribute NameAttribute ValueAttribute Description
srcURLrefers to the url of the document to be loaded into the frame
marginwidthpixelsrefers to space to be left along the sides of the frame
marginheightpixelsrefers to space to be left at the top and bottom sides of the frame
nametextrefers to a unique name for the frame
noresizepixelsrefers to disabling the resizing of the frame
scrollingpixelsrefers to to decide whether to have scrollbarsin a frame
longdescURLrefers to to decide whether to have scrollbarsin a frame
frameborderpixelsrefers to URL to the document containing long description of the frame

Frameset Attributes List

The below table contains HTML Frameset Attributes and their description which is supported by HTML version.

Attribute NameAttribute ValueAttribute Description
rowspixels,%,*used to divide the screen horizontally
colspixels,%,*used to divide the screen vertically
borderURLrefers to the width of the border of the frame
framespacingpixelsrefers to the amount of space between frames in a frameset
frameborderpixelsrefers to whether a three-dimensional border to be displayed between frames

Above attributes can be more easily understood by following examples

Border Example

<!DOCTYPE html>
<html>
<head>
<title>My HTML Image Tag Example</title>
</head>
<frameset rows="50%,50%">
   <frame name="X" src="../secondframe.htm" />
   <frame name="Y" src="../images/nature.png" />
</frameset>
</body>
</html>