This element defines a single frame in a frameset. Its possible attributes are:
This attribute is used to specify the HTML document that will be used as the display in the particular frame section of the frame set.
NAME attribute is used to assign a name to a frame so it can be targeted by links in other documents, by using
<A HREF="URL" TARGET="frame_name"> (These would usually be from other documents in the same frame set.) The
NAME attribute is optional; by default all windows are unnamed.
Names must begin with an alphanumeric character. Several reserved names have been defined, which start with an underscore.
These are currently:
|_blank||Always load this link into a new, unnamed window|
|_self||Always load this link over the document that originated the link.|
|_parent||Always load this link over the parent frame. (becomes self if the frame has no parent, or is the parent frame).|
|_top||Always load this link at the top level. (becomes self if the frame is the top frame).|
NOTE : Although these are reserved names for the
NAME attribute of the
<FRAME> element, they should only be referred to using an Anchor Target. That is, used to target specific windows, allowing smoother transition between framed documents and between framed and non-framed documents (for example when providing a link to documents on a foreign server that may not be framed documents).
This accepts an absolute pixel value and forces indentation from the left and right hand side of the frame pane according to the number of pixels. It cannot be set to a value less than 1 as this would cause the contents of the frame to be displayed right up against the left hand margin. By default, the browser will choose its own
MARGINWIDTH when trying to produce the best possible display.
This is analogous to the
MARGINWIDTH attribute, but it controls the top and bottom margins.
This attribute can be used to control the appearance of any scroll bars that may appear as a result of the frame contents being too much to display in the set pane. Using "no" may be dangerous, because the HTML author cannot know the resolution/display window size of the client browser and so information may not be displayable.
By default, all frames specified in a framed document can be resized by the client. Setting this flag (it requires no value) prevents the frame from being resized.
This attribute allows control of the frame border display. With this attribute set to "0" (Internet Explorer), the borders for the specific frame are not drawn. Netscape claims supports use of this attribute (using values of "yes|no") in the
<FRAMESET> elements, but on testing didn't appear to. Netscape can support borderless frames, using the example given below.
A note about borderless frames
Internet Explorer and Netscape have different methods for producing borderless frames. In Netscape specifying
BORDER="0" in the first
<FRAMESET> element is sufficient to remove all the borders from the frame set. Internet Explorer on the other hand, doesn't support this attribute and requires setting of the
FRAMESPACING attributes (both to
"0") in the first frame set to remove all the borders. For a browser independent (i.e. working in Netscape and Internet Explorer) borderless frame layout, use :
<TITLE>Borderless Frames example</TITLE>
<FRAMESET FRAMEBORDER="0" FRAMESPACING="0" BORDER="0" COLS="165,*" >
<FRAME SRC="contents.htm" NAME="contents">
... other <FRAME> elements (including other <FRAMESET> elements)
This attribute is also Internet Explorer specific and allows the setting of extra space around frames, to give the appearance of floating frames. The "value" should be the distance required around the frame in pixels.
<FRAME FRAMESPACING="40" ...>
would present the frame with an invisible "border" of 40 pixels.
This Netscape specific attribute sets the colours for the border of the specified frame. It can also be used in the
<FRAMESET> element (see above) for globally setting the border colours of a whole frameset. It accepts any #rrggbb hex triplet as a value. Setting the
BORDERCOLOR attribute in the
<FRAME> element over-rides any setting given in the
<FRAMESET> element, of which the
<FRAME> is a part.
The Internet Explorer 4.0 (and above) specific
TITLE attribute is used for informational purposes. The value of the
TITLE attribute aren't presented as a ToolTip for the
LANG attribute can be used to specify what language the
<FRAME> element is using. It accepts any valid ISO standard language abbreviation (for example
"en" for English,
"de" for German etc.) For more details, see the Document Localisation section for more details.
LANGUAGE attribute can be used to expressly specify which scripting language Internet Explorer 4.0 uses to interpret any scripting information used in the
<FRAME> element. It can accept values of
LANGUAGE attribute is set.
CLASS="Style Sheet class name"
CLASS attribute is used to specify the
<FRAME> element as using a particular style sheet class. See the Style Sheets topic for details.
ID="Unique element identifier"
ID attribute can be used to either reference a unique style sheet identifier, or to provide a unique name for the
<FRAME> element for scripting purposes. Any
<FRAME> element with an
ID attribute can be directly manipulated in script by referencing its
ID attribute, rather than working through the All collection to determine the element. See the Scripting introduction topic for more information.
DATAFLD attribute can be used to specify a data column name from the Data source (see
DATASRC) that the
<FRAME> is bound to. For more information on the
DATAFLD attribute, see the Data Binding topic. For the
<FRAME> element, the data received from the data source is used for the
SRC attribute, therefore, the data source column should contain valid URL's/URL fragments.
DATASRC attribute can be used to specify a data source that the
<FRAME> is bound to. For more information on the
DATASRC attribute, see the Data Binding topic.
<FRAME> element in a document is an object that can be manipulated through scripting. Scripting of the
<FRAME> element is supported by both Internet Explorer and Netscape, although Netscape only supports the events - none of the properties, or methods for the
<FRAME> element are available to Netscape.
Of the standard Dynamic HTML properties, the
<FRAME...> element/object supports the following: className, document, id, isTextEdit, lang, language, parentElement, parentTextEdit, sourceIndex, tagName and title. Details of these can be found in the standard Dynamic HTML properties topics.
<FRAME> element supports the following properties, which all reflect the values in the attributes described above: borderColor, dataFld, dataSrc, frameBorder, marginHeight, marginWidth, noResize and src.
Of the standard Dynamic HTML methods, the
<FRAME...> element/object supports the following: contains, getAttribute, removeAttribute, scrollIntoView and setAttribute. Details of these can be found in the standard Dynamic HTML Methods topics.
<FRAME...> element/object doesn't support any events.
© 1995-1998, Stephen Le Hunte
|file: /Techref/language/html/ib/Frames/frame.htm, 12KB, , updated: 2007/11/4 15:08, local time: 2022/7/3 03:58,
|©2022 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?|
<A HREF="http://www.sxlist.com/techref/language/html/ib/Frames/frame.htm"> <FRAME></A>
|Did you find what you needed?|
Welcome to sxlist.com!
& kind contributors
just like you!
Please don't rip/copy
Copies of the site on CD
are available at minimal cost.
Welcome to www.sxlist.com!