Click here!

Upload    Contact    Home


R E S O U R C E S

HTMLStuff:

 
 
Home
Artist
Designer
Webmaster
Programmer
What's New
* Resources
 

 

 

Basic Structure

A frames page consists of one or more pages placed on a controlling page. This is the page we will create now.

The first command you must know is the <FRAMESET> command. This is the command that actually creates the frames. You must tell <FRAMESET> if you want columns or rows. You must also tell <FRAMESET> how large each frame should be. So, first set up your basic code:

 
<HTML>
<HEAD><TITLE>This is the Control Page</TITLE></HEAD>
</HTML>
 

Notice that there is no <BODY> command. This command is generally not used on a framed page.
Now it is time to add in the <FRAMESET> command. Add it like so:

<HTML>
<HEAD><TITLE>This is the Control Page</TITLE></HEAD>
<FRAMESET COLS="50%,50%">
</FRAMESET>

</HTML>
 

Notice that the <FRAMESET> command must be closed off.
Now, the Frames are set up to each take up half of the browser. Now for the important part, the pages to add. This will use another command, the <FRAME SRC> command.

<HTML>
<HEAD><TITLE>This is the Control Page</TITLE></HEAD>
<FRAMESET COLS="50%,50%">
<FRAME SRC="testone.html">
<FRAME SRC="testtwo.html">

</FRAMESET>
</HTML>

Now take a look at what you done.
As you can see, each page has taken up half of the space on the page. Don’t like that style? Try rows instead!

 
<HTML>
<HEAD><TITLE>This is the Control Page</TITLE></HEAD>
<FRAMESET ROWS="50%,50%">
<FRAME SRC="testone.html">
<FRAME SRC="testtwo.html">
</FRAMESET>
</HTML>

 

I can see your next question... can I use more then two pages at the same time? Of course!

<HTML>
<HEAD><TITLE>This is the Control Page</TITLE></HEAD>
<FRAMESET ROWS="20%,20%,20%,20%,20%">
<FRAME SRC="testone.html">
<FRAME SRC="testtwo.html">
<FRAME SRC="testthree.html">
<FRAME SRC="testfour.html">
<FRAME SRC="testfive.html">

</FRAMESET>
</HTML>

Pretty confusing looking page isn't it? Remember that when using frames. Too many frames can look confusing to anyone trying to view your page.

Now, there is one problem with the above examples. The effect you want is not what the person on the other end may see if they use a different screen resolution then you. So, try using pixels instead.

<HTML>
<HEAD><TITLE>This is the Control Page</TITLE></HEAD>
<FRAMESET COLS="140, *">
<FRAME SRC="testone.html">
<FRAME SRC="testtwo.html">
</FRAMESET>
</HTML>

 

Not bad, eh? Looks a little more like a table of contents page with a main page next to it. Now, the * that was after the 140 means that whatever space is left over should be taken by the other page.

<<Back Next>>

Head on to:

Part 1: Introduction
Part 2: The Basic Structure
Part 3: No Borders and Scrolling
Part 4: No Frames
Part 5: Borders: Size and Color
Part 6: Links!
Part 7: Margin Width and Height
Part 8: IFrame and Conclusion
256 Color Hex Chart
HTML Command Reference


Back to Tutorial Menu
Back to Designer Main Page
Back To HTML Stuff Main Page

 

  News   Contact   Advertise   CD ROM   Search   Upload   Help   Home

Copyright © 2000 Tucows.Com Inc.
TUCOWS.Com Inc. has no liability for any content or goods on the TUCOWS site or the Internet, except as set forth in the terms and conditions and privacy statement.