<IFRAME> | NN n/a IE 3 HTML 4
<IFRAME>...</IFRAME> | End Tag: Required
An IFRAME element creates an inline frame within the natural flow of a document's content. The frame is a rectangular space into which you may load any other HTML document (or use scripts to dynamically write content to the space). If you assign a value to the NAME attribute of an IFRAME element, you may supply that name as the value of a TARGET attribute of A, FORM, or other element that lets you define a target for a destination or returned document. Although an IFRAME element's rectangular space begins immediately following the content that comes before it (including in a line of text), all content following the end tag starts on the next line following the frame rectangle. Text leading up to the IFRAME element can be aligned in the same ways that text can be aligned around an IMG or OBJECT element. Content between the start and end tags is ignored by browsers that support the IFRAME element. All others display such content as inline HTML content (as a way to let users know what they're missing and perhaps provide a link to related information). The Navigator 4 element that comes closest to the functionality and behavior of the IFRAME element is the ILAYER element.
Example
    <IFRAME SRC="quotes.html" WIDTH=150 HEIGHT=90>
    <A HREF="quotes.html" TARGET="new" STYLE="color:darkred">
     Click here to see the latest quotes </A>
    </IFRAME>
Object Model Reference
IE | [window.]document.frameName

ALIGN | NN n/a IE 3 HTML 4
ALIGN="alignmentConstant" | Optional
Determines how the rectangle of the IFRAME element aligns within the context of surrounding content.
Example
    <IFRAME SRC="quotes.html" WIDTH=150 HEIGHT=90 ALIGN="baseline"></IFRAME>
Value Case-insensitive constant value.
Default | bottom
Object Model Reference
IE | [window.]document.frameName.align

BORDER | NN n/a IE 4 HTML n/a
BORDER="pixelCount" | Optional
Theory and practice of IFRAME element borders in Internet Explorer 4 diverge a lot, especially when trying to match behaviors across operating systems. IE 4 for the Macintosh displays IFRAME elements with a 3-D effect around the border that is always visible, no matter what border attribute settings are assigned. For the Windows 95 version, the 3-D effect goes away when you turn off the FRAMEBORDER attribute. As for the BORDER attribute, the size of the border acts as a margin setting in IE 4/Mac, but only for the top and left edges of the frame space: content is displaced to the right and down by the border size, causing the content to flow over the right and bottom edges--quite a mess. The BORDER attribute setting appears to have no effect in Windows 95. In no case does the border around an IFRAME look like a FRAME element border in IE 4. That the HTML 4.0 specification does not include a BORDER attribute might lead one to believe it prefers the use of style sheet borders, instead of borders tied only to frames. If you want a genuine border around an IFRAME element in IE 4, use a style sheet border instead. Its behavior is far more consistent and predictable (and is thoroughly unrelated to nonfunctioning style sheet borders for frames defined by a FRAMESET).
Example
    <IFRAME SRC="quotes.html" WIDTH=150 HEIGHT=90 BORDER=10></IFRAME>
Value A positive integer value.
Default | 0
Object Model Reference
IE | [window.]document.frameName.border

BORDERCOLOR | NN n/a IE 4 HTML n/a
BORDERCOLOR="colorTripletOrName" | Optional
The BORDERCOLOR attribute should assign a color to whatever border surrounds an IFRAME element. In practice, because borders controlled by attributes do not appear in the Windows 95 version of Internet Explorer 4, no color appears either. On the Macintosh side, an assigned color may appear on two adjacent edges of an IFRAME element, but the look is unpredictable. Use style sheet rules to assign borders and border colors to IFRAME elements.
Example
    <IFRAME SRC="quotes.html" WIDTH=150 HEIGHT=90 BORDERCOLOR="salmon">
    </IFRAME>
Value A hexadecimal triplet or plain-language color name.
Default | None.
Object Model Reference
IE | [window.]document.frameName.borderColor

DATAFLD | NN n/a IE 4 HTML n/a
DATAFLD="columnName" | Optional
Used with IE 4 data binding to associate a remote data source column name in lieu of an SRC attribute for an IFRAME element. The data source column must contain a valid URI (relative or absolute). A DATASRC attribute must also be set for the element.
Example
    <IFRAME DATASRC="#DBSRC3" DATAFLD="newsURL"></IFRAME>
Value Case-sensitive identifier.
Default | None.
Object Model Reference
IE | [window.]document.frameName.dataFld

DATASRC | NN n/a IE 4 HTML n/a
DATASRC="dataSourceName" | Optional
Used with IE 4 data binding to specify the name of the remote ODBC data source (such as an Oracle or SQL Server database) to be associated with the element. Content from the data source is specified via the DATAFLD attribute.
Example
    <IFRAME DATASRC="#DBSRC3" DATAFLD="newsURL"></IFRAME>
Value Case-sensitive identifier.
Default | None.
Object Model Reference
IE | [window.]document.frameName.dataSrc

FRAMEBORDER | NN n/a IE 3 HTML 4
FRAMEBORDER="borderSwitch" | Optional
Controls whether an individual frame within a frameset displays a border. Setting IFRAME element borders via the element's attributes is chancy at best in Internet Explorer 4. Use style sheet borders instead.
Example
    <IFRAME SRC="quotes.html" WIDTH=150 HEIGHT=90 FRAMEBORDER=0></IFRAME>
Value On-off values for this attribute vary with the source. HTML 4.0 specifies the values of 1 (on) and 0 (off). Navigator uses yes and no. Internet Explorer 4 accepts the HTML values and yes or no.
Default | 1
Object Model Reference
IE | [window.]document.frameName.frameBorder

FRAMESPACING | NN n/a IE 4 HTML n/a
FRAMESPACING="pixelLength" | Optional
Controls the thickness of space between multiple, adjacent IFRAME elements. In practice, the attribute has no effect in Internet Explorer 4. Use style sheet border attributes to create borders around IFRAME elements.
Value A positive integer.
Default | 0
Object Model Reference
IE | [window.]document.frameName.frameSpacing

HEIGHT, WIDTH | NN n/a IE 4 HTML n/a
HEIGHT="length" WIDTH="length" | Optional
Microsoft HTML documentation for IE 4 says that the HEIGHT and WIDTH attributes control the size of a IFRAME element. The attributes are recognized in IE 4 for Windows, but not for the Macintosh. Moreover, these attributes are not recognized as scriptable properties--often a sign that the attributes are not genuinely supported. Use these attributes at your own risk. Instead, you can rely on style sheet positioning (using relative positioning) to set the height and width of the element in all operating system platforms.
Example
    <IFRAME SRC="nav.html" HEIGHT=200 WIDTH=200>
Value Any length value in pixels or percentage of available space.
Default | A width of 300 pixels; a height of 150 pixels.

HSPACE, VSPACE | NN n/a IE 4 HTML n/a
HSPACE="pixelCount" VSPACE="pixelCount" | Optional
Sets padding around an IFRAME element within content flow. The HSPACE attribute controls padding along the left and right edges (horizontal padding), and the VSPACE attribute controls padding along the top and bottom edges (vertical padding). Adding such padding provides an empty cushion around the frame. As an alternate, you can specify the various margin style sheet settings, especially if you want to open space along only one edge.
Example
    <IFRAME SRC="nav.html" HSPACE=20 VSPACE=10>
Value Any positive integer.
Default | 0

LONGDESC | NN n/a IE n/a HTML 4
LONGDESC="URL" | Optional
Specifies a URL of a document that contains a longer description of the element than what the content of the TITLE attribute reveals. One application of this attribute in future browsers is to retrieve an annotated description of the element for users who cannot read the browser screen.
Example
    <IFRAME LONGDESC="navDesc.html" TITLE="Navigation Bar" SRC="navbar.html">
    </IFRAME>
Value Any valid URI, including complete and relative URLs.
Default | None.

MARGINHEIGHT, MARGINWIDTH | NN n/a IE 3 HTML 4
MARGINHEIGHT="pixelCount" MARGINWIDTH="pixelCount" | Optional
Determine the number of pixels between the inner edge of a frame and the content rendered inside the frame. The MARGINHEIGHT attribute controls space along the top and (when scrolled) the bottom edges of a frame; the MARGINWIDTH attribute controls space on the left and right edges of a frame. The HTML 4.0 specification leaves default behavior up to browsers. Without any prompting, Internet Explorer 4 automatically inserts a margin of 14 (Windows) or 8 (Macintosh) pixels inside a frame. But if you attempt to override the default behavior, be aware that setting any one of these two attributes causes the value of the other to go to zero. Therefore, unless you want the content to be absolutely flush with various frame edges, you need to assign values to both attributes. Due to the disparity in default values for each operating system, you cannot assign truly default values to these attributes.
Example
    <IFRAME SRC="navbar.html" MARGINHEIGHT=20 MARGINWIDTH=14></IFRAME>
Value Any positive integer value or zero.
Default | 14 (Windows) or 8 (Macintosh).
Object Model Reference
IE | [window.]document.frameName.marginHeight [window.]document.frameName.marginWidth

NAME | NN n/a IE 3 HTML 4
NAME="elementIdentifier" | Optional
When links and forms must load their destination or returned documents into frames other than the one holding the link or form, those elements have TARGET attributes indicating which frame receives the new content. To direct such content to a frame, the frame must have a value assigned to its NAME attribute. That same value is assigned to the TARGET attribute of the A or FORM element. Client-side scripting also uses the frame's name in building references to other frames or content in other frames. It is good practice to assign a unique identifying name to all frames.
Example
    <IFRAME NAME="navbar" SRC="nav.html"></IFRAME>
Value Case-sensitive identifier.
Default | None.
Object Model Reference
IE | [window.]document.frameName.name

NORESIZE | NN n/a IE 4 HTML n/a
NORESIZE | Optional
It's curious why the NORESIZE attribute is included in Internet Explorer for the IFRAME element. Regardless of the setting, an IFRAME element cannot be manually resized by the user.
Example
    <IFRAME SRC="navbar.html" NORESIZE></IFRAME>
Value The presence of the attribute makes the frame nonresizable (although so does its absence).
Default | An IFRAME element is supposed to be resizable by default, but in practice it is not.
Object Model Reference
IE | [window.]document.frameName.noResize

SCROLLING | NN n/a IE 3 HTML 4
SCROLLING=auto | no | yes | Optional
By default, browsers add vertical and/or horizontal scrollbars when the content loaded into an inline frame exceeds the visible content region of the element. Scrollbars can affect the layout of some content because they occupy space normally devoted to content (that is, the frame does not expand to accommodate scrollbars). Also, due to differences in default font sizes in browsers and operating system versions, a given collection of text content may display differently in different clients. If you want to prevent scrollbars from appearing in the frame, set the SCROLLING attribute to no; if you want scrollbars to be in the frame at all times, set the attribute to yes. In the latter case, if the content does not require scrolling, the scrollbars are visible, but disabled. Setting the SCROLLING attribute to no should be used only after you have tested on all browsers and platforms that mission-critical content is always visible in the frame. If the frame is set to not scroll, some users might not be able to see all content of the frame.
Example
    <IFRAME SRC="navbar.html" SCROLLING=no></IFRAME>
Value Case-insensitive constant values (optionally quoted): auto | no | yes.
Default | auto
Object Model Reference
IE | [window.]document.frameName.scrolling

SRC | NN n/a IE 3 HTML 4
SRC="URL" | Optional
Defines the URL of the content to be loaded into the IFRAME element. The URL can be an absolute URL or one relative to the URL of the document containing the frameset specifications. You may also use the javascript: pseudo-URL to have the returned value of a script appear in the frame. If you omit the SRC attribute, the frame opens empty.
Example
    <IFRAME SRC="navbar.html"></IFRAME>
Value A complete or relative URL or a javascript: pseudo-URL.
Default | None.
Object Model Reference
IE | [window.]document.frameName.src

STYLE | NN n/a IE 4 HTML 4
STYLE="styleSheetProperties" | Optional
This attribute lets you set one or more style sheet rule property assignments for the current element. Styles affect the inline frame and not its content. Therefore, a border assigned to an IFRAME element style appears around the frame, not inside the frame.
Example
    <IFRAME SRC="navbar.html" STYLE="border:solid blue 3px"></IFRAME>
Value An entire CSS-syntax style sheet rule is enclosed in quotes. Multiple style attribute settings are separated by semicolons. Style sheet attributes are detailed in .
Default | None.
Object Model Reference
IE | [window.]document.frameName.style