Using
Frames
I'm
sure by now you have seen many pages that use frames.
Some pages use them quite successfully, while others
do not. Some pages use them and you might not even be
aware the page is made with frames. However they are
used, they are still at the center of a lot of controversy.
The controversy centers around the fact that you can,
with frames, link to another web site and have that site
appear within your own. This, of course, is very attractive
to advertisers, but it isn't really altogether ethical.
We
don't need to worry about that though because this page
will show you how to build frames without taking credit
for someone else's work.
Frames
are created with the <frameset>
tag. This tag creates a frame "shell,"
in which you will place other whole pages.
Look
at a simple page with frames.

Some
things that you need to notice:
- The
opening tag is <frameset>.
This tag creates the shell.
- An
attribute of the <frameset>
tag is "cols." This stands for columns.
You can also use "rows," but you cannot
use them together. I'll explain later.
-
After
the = sign in cols I have typed "*,*"
The star means "whatever is left over."
Since I have two stars, I am essentially saying
2 frames of equal width. I could have written:
"*,*"
"50%,50%"
"300,300"
which
would have accomplished the same thing--two
columns of equal width.
- If
you have two columns, you need to have two <frame
src="name.html">, one for each
frame.
- Please
notice also that there are no
<body> tags in the index.html document.
The tag <frameset> takes
the place of the body. There really isn't a body
in a frames document. The body comes from the source
of the frame.
When
you view this page in the browser, this is what you should
see:

All
you really have is a bar separating the two sections.
If "hello.html" were a long document and could
not fit in the frame, the browser would have automatically
added scroll bars.

