HTML Frames :
DEFAULT PAGES








You can add default pages to frame windows with the src setting.

Default pages are the pages that will be loaded when the frameset is opened the first time.

Furthermore, we can add names to each frame window using the name setting.

This will allow us to make a link in one frame window, open a page in another frame window.

In this example we added names and default pages to the frame windows:

<frameset cols="120,*" >
<frame src="menu.htm" name="menu" >
<frame src="frontf.htm" name="main" >

</frameset>


The entire frameset will look like this:

m
e
n
u


main



We still have the screen divided in two columns, the left being 120 pixels the right using the rest of the screen. (some screens are set to 640 pixels across, some to 800 and some to 1024, thats why the * is needed).

But now we also have told the browser that the left frame window should load an HTML page called menu.htm and that the right window should load an HTML document called frontf.htm.

In addition we have assigned the names menu and main to the two frame windows, so now we're even able to link to specific windows.

We called the frame windows menu and main, but you could name them whatever you pleased.

The frameset with a menu window to the left and a main window to the right is the most common frameset seen on the web.

There are a few more settings we could add to the frameset.

For instance you might want the frame borders to be invisible.

Proceed to the next page to learn how....

 << PREVIOUS
READ MORE >>  
















DEVELOPER TIP!





     "Better Than Books - As Easy As It Gets!"