|
What
Are Frames?
Browsers from Netscape
2.0 on up are capable of displaying multiple separate, independent
Web pages at the same time, on different parts of the display
screen. The different parts of the screen are called frames.
Documents in one frame
can directly affect the contents of documents in another frame,
if programmed correctly.
Frames are useful for
applications such as a site index that always remains
on-screen.
A framed page could
look something like this:
|
Web
Page 1
|
Web
Page 2
|
|
Web
Page 3
|
Frames are controlled
by a document called a Layout Page. This is an HTML page
of a different format.
Instead of the usual
<BODY> </BODY> tag pair, a Layout Page uses a pair
of tags <FRAMESET> </FRAMESET>. These tags
indicate how many frames are within the page, the size of the
frames, and certain properties of the frames.
Each individual frame
in the frameset is controlled by a particular tag: <FRAME>.
Each <FRAME> tag controls both the contents of the frame
and certain properties of the frame itself.
The frameset usually
contains one other tag pair as well: <NOFRAMES> </NOFRAMES>.
Anything that appears within this tag pair is displayed when the
page is viewed by a browser that does not support frames.
GENERAL
STRUCTURE OF FRAMES:
<FRAMESET ROWS=(#
or % or *, # or % or *, etc) [or] COLS=(# or % or *, # or % or
*, etc) BORDER=# FRAMEBORDER=# NAME=(Name of Frame 1)>
<FRAME SRC=(URL for frame 1) NORESIZE SCROLLING=YES,NO,AUTO
MARGINWIDTH=# MARGINHEIGHT=# NAME=(Name of Frame 2)>
<FRAME SRC=(URL for frame 2) NORESIZE SCROLLING=YES,NO,AUTO
MARGINWIDTH=# MARGINHEIGHT=#>
<NOFRAMES> HTML Code for Non-frame browser </NOFRAMES>
</FRAMESET>
|