0% found this document useful (0 votes)
21 views2 pages

HTML Frames

HTML frames are used to divide the browser window into multiple sections that can each load a separate HTML page. Frames are defined using <frame> tags within a <frameset>, which defines how the window is divided horizontally using rows or vertically using cols. Examples show how to create frames that load different pages.

Uploaded by

Amal Rana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views2 pages

HTML Frames

HTML frames are used to divide the browser window into multiple sections that can each load a separate HTML page. Frames are defined using <frame> tags within a <frameset>, which defines how the window is divided horizontally using rows or vertically using cols. Examples show how to create frames that load different pages.

Uploaded by

Amal Rana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Topic: Frames in html

Definition of frame:
HTML frames are used to divide browser window into multiple sections where each section can
load a separate HTML page. A collection of frames in the browser window is known as a
frameset. To use frames on a page we use <frameset> tag instead of <body> tag. Each frame
is indicated by <frame> tag.

Syntax of including a frame is as follows:

< frame src = "Address of Html page" >


Difference between frame and frameset:
Frame <frame> Frameset <frameset>
An element in html that divides browser A collection of frames in the browser window is
window into multiple sections where each known as a frameset.
section can load a separate HTML page
Each frame holds a separate document. Each frameset holds one or more frames.
Has attributes such as frameborder, name, Has attributes such as cols, rows
marginwidth, marginheight etc

Creating Frames
To use frames on a page we use <frameset> tag instead of <body> tag. The <frameset> tag
defines, how to divide the window into frames. The rows attribute of <frameset> tag defines
horizontal frames and cols attribute defines vertical frames. Each frame is indicated by <frame>
tag and it defines which HTML document shall open into the frame. The src attribute in <frame>
tag is used to identify the address of webpage that should be loaded inside each frame.
Example 1:Create one frame using <frameset>
<html>
<frameset >
<frame src="frame1.html" >
</frameset>
</html>
Exampe2: Create three Vertical frames:
<html>
<frameset cols="25%,50%,25%">
<frame src="frame1.html" >
<frame src="frame2.html">
<frame src="frame3.html">
</frameset>
</html>
Exampe3: Create two Horizontal frames:
<html>
<frameset rows="50%,50%">
<frame name="top" src="frame1.html" >
<frame name="bottom" src="frame3.html">
</frameset>
</html>

You might also like