Untitled Document

HTML Frame

To display multiple HTML documents as splitted in the browser window the <frame> elements are used widely with its various attributes.

The <frameset> tag

The <frameset> tag is used in the main document (top level document) to define a window containing frames. The basic attributes of <frameset> tag are 'rows' and 'cols'.

<frameset rows="25%,*,20%">.........</frameset>


<frameset cols="20,*,20">.........</frameset>

The <frame> tag code

The <frame> tag is used within <frameset> tag to specify the HTML file to be displayed in the concerned frame with attribue value.

The URLs of the files are to be specified using the 'src' attribute.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<frameset cols="40%,30%,*">
<frame src="banner.html">
<frame src="menu.html">
<frame src="content.html">

Note: The asterisk (*) represents the remaining space available in the page.