2.1  HTML2 - Frames

Index Code Tester

OBJECTIVE

DISCUSSION

Frames

Example to Set Up Frame Page

    <html>
    <head>
      <title>Frame Example </title>
    </head>
    <frameset framespacing="0" rows="66,*" frameborder="0">
        <frame name="banner" src="banner.htm" noresize="noresize" scrolling="no" />
        <frameset cols="33%,*">
           <frame name="contents" src="toc.htm" scrolling="auto" />
           <frame name="main" src="home.htm" scrolling="yes" />
        </frameset>
    </frameset>
    </html>
    

Example Link in Frame Page

    <a href = "newpage.htm" target = "main">New Page</a>

   

EXERCISES

  1. Create a Frameset page that has three frames: a table of contents down the left side, a banner across the top, and a main area on the right. You will need to create four web pages: (1) the frameset page, (2) the toc.htm page, (3) the home.htm page, and (4) the banner.htm page.  You can/should use the code above to create the frameset page.  Add a link to the toc.htm page that displays another page in the main frame. Your page should look as shown on the following link:  Example Exercise
  2. Experiment with the frameset page that you created in #1.  Explain how to modify the code so that ...
    1. The banner takes up half the height of the window.
    2. None of the frames have scrollbars.
    3. The width of the table of contents is fixed at 120.
  3. Create a Frameset page with three vertical frames.  Make the left frame 25% of the width, the middle frame 50% of the width, and the right frame 25% of the width.
  4. Create your personal web site for this class using frames.

LINKS AND HELP

Frames: http://www.w3schools.com/html/html_frames.asp