Labs

Lab 4.6: You've Been Framed

Print
References

In the text we describe frames as a powerful new addition to the HTML1 language. Frames allow you to manage portions of a page as if they are separate pages (which, as you will see, they are!), altering the contents of one section while leaving another the same. Frames also afford us tremendous flexibility in defining new pages, because we can use previously defined and debugged pages as our building blocks. We'll use this lab to show you an example of a page composed of frames, and then have you apply the technique to your home page.

  1. Look through Rick & Stu's Home Page, as presented in previous labs, both as displayed by your browser and in its HTML code, for evidence of frames and you won't find any. If frames are so powerful and so cool, why haven't we incorporated them into our home page? The answer is that we didn't have to!
1pp. 29, 70, 82, 89, 90-91

In all of the recent lab exercises for you've been viewing framed pages Frames are what allowed us to display and manage the pop-up windows (showing HTML code and a version of our home page) that are common to these pages.

You can get a better appreciation for how these pages have been defined by viewing the source code for the pop-up page that opened in its own window when this page was loaded. Its body is a frameset which in turn, identifies and places two frames within it. Most modern browsers2 allow you to look at the HTML code for the individual frames used to compose a page as well.

2pp. 9, 14–15, 70–71, 143, 146

Use whatever information is available to you from your browser to see if you can come up with answers to these questions about this page:

  1. How many frames sets are used in defining the pop-up page?
  2. How many frames are contained in each frameset?
  3. What are the names of all of the pages used to compose this page?

  1. We did, in fact, prepare a "framed" version of Rick & Stu's Home Page for your viewing pleasure - it's the one that popped up in this lab. Check out the source now, and you'll see that we took the main navigation image (which we had originally call "network") and placed it in a separate file from the rest of the original page. We then described the new page as a frameset composed of our two HTML files.

  2. Produce a framed version of your home page now. Put the "table of contents" (or whatever you use to control navigation3 from the top of you page) in a frame along the left edge of the page. Use the rest of the page to display the contents of individual sections of you home page.
3pp. 86, 123, 131

Labs

MODULES:


Home Search Resources Objectives Feedback Order Form Credits

Copyright Notice
© 1998 PWS Publishing Company, All Rights Reserved.