Site hosted by Angelfire.com: Build your free website today!
Tutorial 5d : Frames

Cloudy, in this Tutorial we will learn sth new, that is the "frame" tag. The frame tag is unlike the normal tags we have learned before. It involves writing a few html pages, to make another HP page. See the diagramme below to understand the concept of frames :

Here, we have a page with 2 frames, Frame 1 and 2. Frame 1 is a html page itself, just like other pages u have written before. The same also for Frame 2. Normally Frame 1 is used to put menu/choices, and Frame 2 is to put the thing to write or the things to appear if we click menu on Frame 1. Then, to hold Frame 1 and 2, we will have to write another html file. Below are some examples of frames. Click on each of them and see their codings. To viewsource of the coding for each frame, right-click on the respective frame. And to get coding for the frame that holds other frames, select 'View' from grey bar on screen, then choose 'Source'.

Frame Example 1  Thi to drags example shows u a simple frames page with 2 columns. If u see the coding for the page that hold the two column frames, I put : "cols=25%,*" . The asterisk(*) symbol means that it represents the rest of space(which is 75%). U can also write 75%.

Frame Example 2  This example shows u a simple frames page with 2 columns, and some settings like scrolling, and resizing. See the coding for the page that hold the frames. Here, the frames cannot be resized, unlike example 1 where I can drag the area of Frame 1 and 2.(compare coding and see examples)

Frame Example 3  This example shows u a simple frames page with 2 rows, and the settings like in example 2.

These days, not many ppl use frame tags to make HP, coz it reduces our area of viewing on screen. To replace that, they use tables method to create sth like a frames page(see my example in Tutorial 5a) . However, a frames method has got its advantages. Firstly, it saves space on HP account. If ur account has only 20Mb and u have many pages to show in HP, then don't use the tables method. Use frames method is better. For example, u'll save space for the menu coding on every page(coz for frames method, the menu coding will only be on a page in Frame 1, and for table method, u have to put the menu coding on every page coz no Frame 1.) ..... Then, if u use frames and u need to change sth, for example the menu, then u only change Frame 1 rather than every page that has the menu.

How's the frame tag dear? Here, I only teach u the basic, then u can develop ur own ideas and be creative with this tag. Hik, don't blame teacher Jordy, hihih, coz he purposely teach u the basic for this tag only coz he wants student to think, think and think. ;) If teacher shows everything, then student won't learn effective right? ;p ;p ANH WEI MIN YEU EM VAN NGUYEN~!!!