HTML Frames HTML Frames: Seema Sirpal Delhi University Computer Centre
HTML Frames HTML Frames: Seema Sirpal Delhi University Computer Centre
HTML Frames HTML Frames: Seema Sirpal Delhi University Computer Centre
Seema Sirpal
Delhi University Computer Centre
Frames
With frames, you can display more than one HTML document in
the same browser window. Each HTML document is called a
frame, and each frame is independent of the others.
The <frameset>
frameset tag defines how to divide the
window into frames
<frameset cols="25%,75%">
<f
<frame src="frame_a.htm">
"f ht ">
<frame src="frame_b.htm">
</frameset>
Vertical frameset
<html>
<frameset cols="25%,50%,25%">
<frame
f src="frame_a.htm">
"f ht "
<frame src="frame_b.htm">
<frame src="frame_c.htm">
</frameset>
</html>
Horizontal frameset
<html>
<frameset rows="25%,50%,25%">
<frame src="frame_a.htm">
<frame src="frame_b.htm">
<frame
f src="frame_c.htm">
f
</frameset>
</html>
Useful Tips
If a frame has visible borders, the user can resize it byy dragging
gg g
the border. To prevent a user from doing this, you can add
noresize="noresize" to the <frame> tag.
Add the <noframes> tag g for browsers that do not support
pp frames.
Important: You cannot use the <body></body> tags together with the
<frameset></frameset> tags!
g
<html>
<frameset rows="50%,50%">
<frame
f src="frame_a.htm">
"f ht "
<frameset cols="25%,75%">
<frame
f src="frame_b.htm">
"f b ht "
<frame src="frame_c.htm">
</frameset>
</frameset>
</html>
Frameset with noresize="noresize"
<html>
<frameset rows="50%,50%">
<frame
f noresize="noresize"
i " i " src="frame_a.htm">
"f ht "
<frameset cols="25%,75%">
<frame
f noresize="noresize"
i " i " src="frame_b.htm">
"f b ht "
<frame noresize="noresize" src="frame_c.htm">
</frameset>
</frameset>
</html>
Navigation frame
<html>
<frameset cols="120,*">
<frame src="tryhtml_contents.htm">
<frame src="frame_a.htm" name="showframe">
</f
</frameset>
t>
</html>
In “tryhtml_contents.htm"
<frameset cols="25%,50%,25%">
<frame src="frame_a.htm">
<frame
f src="frame_b.htm">
"f b ht "
<frame src="frame_c.htm">
<noframes>
f
<body>Your browser does not handle frames!</body>
</noframes>
</frameset>
</html>
Jump to a specified section with frame
navigation
<html>
<frameset cols="180,*">
cols 180, >
<frame src="content.htm">
<frame src="link.htm" name="showframe">
</frameset>
</html>
In "content.htm"