So far, we have only written pages that are split either horizontally
or vertically. To get more complicated structures, we have to nest
the <frameset> tags. Let's add a green bottom bar
to the flag of France:
<html> <head> <title>France with Green Bottom Bar</title> </head> <frameset rows="*,50"> <frameset cols="33%,33%,33%"> <frame src="blue.html"> <frame src="white.html"> <frame src="red.html"> </frameset> <frame src="green.html"> </frameset> </html>
Sometimes it might be more convenient to have two or more layout pages instead of one. Since we had france.htm already written, we might just want to write a layout page that adds the green bottom bar to that page (or any other page that we specify):
In this case, the layout for the whole window is stored in greenbot.htm, whereas the layout for the upper frame is in france.htm. As we see, it doesn't make a difference whether a frame contains a content page or another layout page. However, to prevent infinite loops, the browser won't display a frame nested (directly or indirectly) in itself. With nesting framesets, we can now construct arbitrary complex rectangular frame layouts.<html> <head> <title>Green Bottom Bar</title> </head> <frameset rows="*,50"> <frame src="france.html"> <frame src="green.html"> </frameset> </html>
INDEPENDANT PRACTICE
Try to make a layout that resembles the Stars and Stripes banner (you can forget the stars though!).
NEXT Frame Names