Sams Teach Yourself HTML and CSS in 24 Hours (7th Edition)

Hour 16. Multipage Layout with Frames

You've probably come into contact with web sites in which the browser window seemingly allowed you to move around between several different pages. The truth is that the browser really was allowing you to view several pages at once. An HTML feature known as frames allows you to divide the browser window into regions that contain separate web pages; each of these regions is known as a frame. Of course, from the user's perspective, everything comes together to form a single window of web content, but there are separate pages at work.

Frames are roughly similar to tables (covered in Hour 11, "Using Tables to Organize and Lay Out Your Pages") in that they allow you to arrange text and graphics into rows and columns. Unlike a table cell, however, any frame can contain links that change the contents of other frames (or itself). For example, one frame could display a table of contents page that changes the page displayed in another frame based on which links the user clicks.

Try It Yourself

Frames are basically a way of arranging and presenting several web pages at once. You'll be able to work through this hour faster and get more out of it if you have a few related web pages ready before you continue:

  • If you have an index page or table of contents for your web site, copy it to a separate directory folder so that you can experiment with it without changing the original. Copy a few of the pages that the index links to as well.

  • As you read this hour, try modifying the sample frames I present to incorporate your own web pages.

Категории