1. Home
  2. Computing & Technology
  3. Python

Part 1: Laying the Groundwork with HTML, CGI, and PHP

From , former About.com Guide

4 of 10

The Three Frames of the Web Interface

Now let's create some frames. I assume you are already familiar with the basic layout of a HTML document. Otherwise, see Jennifer Kyrnin's HTML tutorial on frames To create the frames, use the following HTML after the [BODY] element:

<FRAMESET cols="20%, 80%">
<FRAMESET rows="35, 265">
<FRAME name="menu" src="menu.html">
<FRAME name="listing" src="">
</FRAMESET>
<FRAME name="target" src="">
This sets up three frames and gives each one a different name. The frames for the menu and item list are both in the leftmost 20% of the screen; the 80% left is for the web page to be loaded. Within the leftmost 20%, the top 35 rows are for the menu, and the lower 265 are for the listing itself.

Next, you will notice the names and the sources of each page. The menu will be sourced from menu.html , the next page we need to develop. When the chosen feed is retrieved and processed, the results will be posted to listing. Links in the listing will be designated to appear in the target frame.

What about the blank src tags? They are optional. They may be included by analogy with the menu frame, and they also serve to underscore the fact that both sources are variable.

Explore Python
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Python

©2009 About.com, a part of The New York Times Company.

All rights reserved.