The IFRAME element is used to create in-line floating frames. These are much like standard frames, except they can be anywhere within a standard HTML document.
<IFRAME
ALIGN=ABSBOTTOM | ABSMIDDLE | BASELINE | BOTTOM | LEFT | MIDDLE |
RIGHT | TEXTTOP | TOP
BORDER=pixels
BORDERCOLOR=color
CLASS=Style Sheet class name
DATAFLD=colname
DATASRC=Data Source
FRAMEBORDER=NO | YES | 0 | 1
FRAMESPACING=spacing
HEIGHT=n
HSPACE=n pixels
ID=value
LANG=language
LANGUAGE=JAVASCRIPT | JSCRIPT | VBSCRIPT | VBS
MARGINHEIGHT=n pixels
MARGINWIDTH=n pixels
NAME=window_name | _blank | _parent | _self | _top
NORESIZE=NORESIZE | RESIZE
SCROLLING=AUTO | NO | YES
SRC=url
STYLE=styling
TITLE=text content
VSPACE=n pixels
WIDTH=n
>
Parameter |
Description |
ALIGN |
Specifies the alignment for the control-like element. The possible values of this attribute are: left, right, top, texttop, middle, absmiddle, baseline, bottom, absbottom. |
BORDER |
Specifies the thickness of a border to be drawn around the element. |
BORDERCOLOR |
Sets border color and must be used with the BORDER attribute, except for frames. |
CLASS |
Class of the tag being defined. This is used to associate a subclassed style sheet with the tag. |
DATAFLD |
The column name from the data source object that supplies the bound data. |
DATASRC |
Indicates the ID of the data source object that supplies the data that is bound to this element. |
FRAMEBORDER |
Specifies whether or not to display a border for the frame. |
FRAMESPACING |
Creates additional space between the frames. |
HEIGHT |
Along with WIDTH, specifies the size at which the element is drawn. This attribute may be initially set in pixels or percentages. |
HSPACE |
Along with VSPACE, specifies horizonal margins for the element |
ID |
SGML identifier used as the target for hypertext links or for naming particular elements in associated style sheets. Valid ID values must begin with a letter. The underscore character, "_", may be used in the ID name. The ID should be unique throughout the scope of the document. If more than one object with the same identifier exists in a document, a collection of those named items is created that can only be referenced by ordinal position. |
LANG |
Specifies which language to use in ISO standard language abbreviation form. |
LANGUAGE |
Specifies the language the current script is written in and invokes the
proper scripting engine. The default value is JAVASCRIPT. |
MARGINHEIGHT |
Sets the amount of top and bottom margin should be set before displaying the text in a frame. |
MARGINWIDTH |
Sets the amount of left and right margin should be set before displaying the text in a frame. |
NAME |
Window or frame at which to target the contents. If no frame or window
exists that matches the specified target, a new window is opened for the
specified link. If no target is specified, the default is "_self"
for a link within the same site or "_top" if the site is external.
Special target values are: |
NORESIZE |
When this attribute is supplied, the frame is not resizable by the user. The default behavior allows the user to resize the frame. |
SCROLLING |
Specifies that the frame can be scrolled. If set to "AUTO," the browser determines whether scrollbars are necessary. |
SRC |
Specifies a URL for the associated file. |
STYLE |
Inline style sheet for the tag. |
TITLE |
The TITLE attribute is for advisory information (unless used with a mailto: attribute). The Title attribute should provide the title of the document whose address is given by the HREF attribute. The contents of the title attribute will be displayed in a tooltip during the mouse moves on the link. Internet Explorer 4.0 (and above) is the only browser to implement this. |
VSPACE |
Along with HSPACE, specifies vertical margins for the element. |
WIDTH |
Along with HEIGHT, sets the initial size of the element. This attribute may be initially set in pixels or percentages. |
Supported by Internet Explorer (version 3.0 or above).
<IFRAME NAME="main" width="500" height="150" src="htmltagframe.htm"></iframe>
The code is rendered as:
Any HTML between these elements will be displayed by browsers that do not support floating frames, while the frame specified in the <IFRAME> elements will be displayed by those browsers that do.
This element is a block element. Both the start and end tags are required.