HTML FRAMES 2023
Creating HTML Frames
HTML frames are used to divide a browser window into multiple sections where each section
can load a separate HTML document (page).
A collection of frames in the browser window is known as a frameset. The window is divided
into frames in a similar way the tables are organized: into rows and columns.
Unlike a standard web page, a frame page is created without using the body tag.
HTML frames tags:-
Opening tag Explanation Closing tag
<frameset> Used to specify the frame </frameset>
layout in terms of rectangular
subspaces.
Frameset tag attributes:
(i) Cols: defines
horizontal frames
(ii) Rows: defines
vertical frames
<Frame> Specifies the webpage that is Not required
displayed on the created
frame.
<frame> tag attribute:
Src: specifies the webpage or
website to be displayed on the
created frame.
©Juliet 2023 Page 1
HTML FRAMES 2023
Disadvantages of Frames
(i) Some smaller devices cannot cope with frames often because their screen is not big
enough to be divided up.
(ii) Sometimes your page will be displayed differently on different computers due to different
screen resolution.
(iii)The browser's back button might not work as the user hopes.
(iv) There are still few browsers that do not support frame technology.
Creating Frames
To create frames on a page 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.
©Juliet 2023 Page 2
HTML FRAMES 2023
Creating frames using HTML
Creating Frames using HTML
Exercise one
Create the HTML frame shown below:-
Page one contents
Page two contents
Page three contents
Exercise Two
Create the HTML frame shown below:-
Page one contents
Page Two contents Page Three contents Page Four contents
Exercise Three
Page one contents
Page Two contents Page Three contents
©Juliet 2023 Page 3
HTML FRAMES 2023
Exercise Four
Create the HTML frame shown below:-
Page 1 Page 2 Page 3
Page 4
Exercise Five
Create the HTML frame shown below:-
Page one Page 4
Page 2
Page 3
©Juliet 2023 Page 4