Building HTML Frames: Part III
Controlling
the look of the frames
You can modify the frame's attributes and their values. We
begin to list all the attributes of the <FRAME> tag and provide examples to explain
how to use these attribute in controlling the look and feel of the frames.
a) SRC = "URL": This SRC attribute points
to URL document to be displayed in the frame. A frame without an SRC attribute displays a
blank frame.
Example: <FRAME SRC = "menu.html">
b) NAME="frame-name"
The NAME
attribute assigns a name to the frame. This name can be targeted as a link later in other
HTML documents or frames.
Example:
<FRAME SRC="menu.html"
NAME="menu page">
<A HREF="moremenu.html" TARGET="menu page">Click here to jump to
the menu page</A>
Note:
When visitors click on the link provided in <A> tag,
they will jump to the framed Web page specified in <FRAME> tag. However, the
contents of the framed Web page "menu.html" will be replaced by the
contents of the file "moremenu.html"
c) MARGINWIDTH="value" and
MARGINHEIGHT="value"
The two attributes control the interior area of the browser. However, there are optional,
so you can leave out of them and let the user browser decides that. But if you want to set
the values for these two attributes, the values cannot be less than 1 pixel.
Example:
<FRAME MARGINWIDTH="10"
MARGINHEIGTH="5">
This would create a frame and its window of contents would
have left and right margins 10 pixels wide and top and botton margins 5 pixels wide.
d) FRAMEBORDER="YES" or
FRAMEBORDER="NO"
If the FRAMEBORDER attribute is set YES, then the
frame borders are drawn with a 3-D look. If it's set NO, then the borders are not visible.
This attribute can be used in <FRAMESET> tag either. This attribute can be used in <FRAMESET> tag.
e) BORDERCOLOR =
"color-name or color-value"
This attribute can be used in <FRAME> tag or in
<FRAMESET> tag.
<FRAMESET BORDERCOLOR="red" COLS
= "25%,75%">
<FRAME SRC = "menu.html"
BORDERCOLOR="#FF00FF">
<FRAME SRC = "info.html">
</FRAMESET>
f) SCROLLING="YES/NO/AUTO"
The Scrolling attribute defines whether the frame has a scroll bar or not. A YES setting
add a scrolling bar to the frame. A NO setting turns the scrolling bar off. If you want to
let the browser decides that, then you can set it to AUTO option.
g) NORESIZE
Adding this attribute to the <FRAME> tag will prevent
visitors from resizing your frames. Otherwise, visitors can resize your frames by dragging
the frame edge to a new position. The NORESIZE attribute doesn't need a value setting, and
by default all frames are resizable.