How to include frameset inside another frameset in HTML ?
Last Updated :
04 Oct, 2021
The frameset is the collection of frames in the browser window. It is used to specify the number of rows and columns in a frameset with their pixels of space. There are some real-world applications of frameset like while making the website for any purpose, the developer first makes the design of the whole website where he divides the whole website into some frames such that each frame has some function. Let’s take an example of a news website, there are various sections like trending, latest, business, cricket news, etc and there is also a slider in some websites which scrolls the image after some seconds.
In this article, we will discuss for creating a nested frameset or a frameset inside another frameset. Let’s see an example to understand the topic much better. Comments are added in the code for better understanding.
Example
HTML
<!DOCTYPE html>
< html >
< head >
< title >Nested Framesets in HTML</ title >
</ head >
< frameset rows = "50%,*,*" >
< frameset cols = "100%" >
< frame name = "frame1" src = "frame1.html" >
</ frameset >
< frameset cols = "*, *, *" >
< frame name = "frame2" src = "frame2.html" >
< frame name = "frame3" src = "frame3.html" >
< frame name = "frame4" src = "frame4.html" >
</ frameset >
< frame name = "frame5" src = "frame5.html" >
</ frameset >
</ html >
|
Below are the codes for frame1.html, frame2.html, frame3.html, frame4.html, frame5.html:
frame1.html
< html >
< head >
< title >frame1</ title >
</ head >
< body bgcolor = "aqua" >
< center >
< img src = "gfglogo.png" alt = "gfglogo"
width = "400" height = "350" >< br >
frame1
</ center >
</ body >
</ html >
|
frame2.html
< html >
< head >
< title >frame2</ title >
</ head >
< body bgcolor = "hotpink" >
frame2
</ body >
</ html >
|
frame3.html
< html >
< head >
< title >frame3</ title >
</ head >
< body bgcolor = "lightgreen" >
frame3
</ body >
</ html >
|
frame4.html
< html >
< head >
< title >frame4</ title >
</ head >
< body bgcolor = "grey" >
frame4
</ body >
</ html >
|
frame5.html
< html >
< head >
< title >frame5</ title >
</ head >
< body bgcolor = "yellow" >
frame5
</ body >
</ html >
|
Output:
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...