<FRAME>
The FRAME element is used to define individual frames that make up a FRAMESET.
A frameset allows you to divide a web page into multiple windows which can be
scrolled independently of one another.
Client-side code such as Javascript and the TARGET attribute allow frames to
"talk" to each other. One of the most common uses of frames is to keep a
navigation element at a set position on the screen while the user scrolls
through a long section of content.
Attributes
Attribute |
Description |
ID |
Identifies this tag to reference in script (program code) |
CLASS |
Define the class used to render this element (defined by a style sheet) |
TITLE |
A title that is associated with the element (displayed as a tooltip in Internet Explorer) |
NAME |
The name attribute identifies the frame for reference through client-side scripting or by the TARGET attribute |
LONGDESC |
Provides a lengthy description of the frame, it's purpose and what it contains |
SRC |
A URI indicating where the contents of the frame should be taken from. This is normally a web page on the same server such as: /myframe/left_frame.php |
NORESIZE |
Include this attribute to indicate that you don't want the user to be able to resize the frame |
SCROLLING |
Indicates how the contents of the frame may be scrolled. Possible values for this attribute are: auto (scrolling is provided as needed), yes or no (no scrolling is allowed) |
FRAMEBORDER |
Should a border be drawn around the edge of the frame? 0 means no and 1 means yes. The default value for this attribute is 1 |
MARGINWIDTH |
Indicate the amount of spacing to place at the left and right edges of the frame. This value is indicated in pixels such as MARGINWIDTH="10" |
MARGINHEIGHT |
Indicate the amount of spacing to place at the top and bottom edges of the frame. This value is indicated in pixels such as MARGINHEIGHT="10" |
|
Example
<FRAMESET ROWS="120,*">
<FRAME NAME="TOPFRAME" SRC="/topframe.php" SCROLLING="no" MARGINWIDTH="0">
<FRAME NAME="TOPFRAME" SRC="/mainframe.php" SCROLLING="auto" MARGINWIDTH="10">
</FRAMESET>
Compatibility
HTML 4.01
|