Frames are used as an alternative, although not suggested, to other standard web page layout configurations.

A web page can be divided into multiple columns or rows called frames. Each frame is actually a window into another HTML page.

In XHTML frameset layout must be declared in DTD (Document Type Definition) as a "frameset" type of a document.

The frameset element (<frameset>) replaces the <body> element, specifies the number of frames to be rendered (<frame>) and defines them as columns and/or rows with their proportions and other properties.

The main attributes are rows and cols which, if skipped, make a frame extend throughout the length or the width of the page, respectively.

The base element (<base>) with a target attribute can be used to assign a default link to a frame used in many positions in the same document. In that case the target attribute of a base element must match the name attribute of that frame.

The <noframes> element is used as an alternate content to support browsers that are not configured to display frames.

Framesets can be nested inside other frameset tags.

Frame element is an empty tag, therefore the closing tag is forbidden.


<frameset cols="" rows=""><frame src="URI" / ><noframes></noframes><body></body></frameset>



HTML frame elements:


›› go to examples ››