# iframe

Defines an inline frame (i.e. a frame embedded in a document).

## Platform Support

IE | Netscape | Mozilla | Opera | Safari
--- | --- | --- | --- | ---
3.0+ | 3.0+ | 1.0+ | 5.0+ | 1.0+

## Example

This example displays an inline frame containing a job opportunities page:

    <iframe src="jobs.htm" height="350px" width="350px" scrolling="yes" >
    Sorry, your browser does not support inline frames. ;/iframe>

## Remarks

If a browser cannot render an inline frame, use a div to mimic the behavior. Browsers that cannot render inline frames will display the text enclosed in the <iframe></iframe> tag set instead.

## Attribute Detail

Attribute | IE | Netscape | Mozilla | Opera | Safari
--- | --- | --- | --- | --- | ---
align Defines the alignment of the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
allowtransparency Specifies whether the background of the element may be transparent. | 5.5+ | no | no | no | no
application Specifies whether the content of the element is considered an HTA application. | 5.0+ | no | no | no | no
bordercolor [color | "transparent"]. Example values: Red, #FF0000 (#RRGGBB color code for "red"), etc. Specifies the color of the border of the element. Specify either a color name or RGB color code. | 4.0+ | no | no | no | no
class [class-name]. Example values: header-class, list-element, etc. CSS class assigned to the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
datafld [field-name] For a databound element, specifies the field supplying the data. | 4.0+ | no | no | no | no
datasrc [name/id-of-data-source] For a databound element, specifies the id of the data source. | 4.0+ | no | no | no | no
frameborder Specifies whether the frame has a border. | 2.0+ | 2.0+ | 1.0+ | 4.0+ | 1.0+
height [number-of-pixels] Height of the element (in pixels). | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
hidefocus Specifies whether the element shows a visual cue when it has focus. | 5.5+ | no | no | no | no
hspace [number-of-pixels] Number of pixels of space to the left and right of the element (i.e. horizontal margin). | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
id [element-id] Unique identifier for the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
lang [language-code]. Example values: "en" (English), "fr" (French), "es" (Spanish), etc. Language code for the content of the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
language Script language for the element. | 3.0+ | 2.0+ | 1.0+ | no | 1.0+
longdesc [url] URL that contains a long description of the contents of the element. | 4.0+ | 1.1+ | 1.0+ | 4.0+ | 1.0+
marginheight [number-of-pixels] Top and bottom margins (in pixels) for the document. | 4.0+ | 4.0+ | 1.0+ | 7.0+ | 1.0+
marginwidth [number-of-pixels] Left and right margins (in pixels) for the document. | 4.0+ | 4.0+ | 1.0+ | 7.0+ | 1.0+
name [element-name] Unique name identifier for the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
scrolling Specifies whether or not the element has scroll bars. | 2.0+ | 2.0+ | 1.0+ | 4.0+ | 1.0+
src [url] URL for the source for the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
style [style-name] Inline style for the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
tabindex [number] Position of the element in the tabbing order for the document. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
title [text-description] Short text description for the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
unselectable Specifies whether or not the element is unselectable. | 5.5+ | no | no | no | no
vspace [number-of-pixels] Number of pixels of space above and below the element (i.e. vertical margin). | 2.0+ | 1.0+ | 1.0+ | 7.0+ | 1.0+
width [number-of-pixels | percentage]. Example values: 200px, 15%, etc. Width of the element (pixels or percentage). | 2.0+ | 1.1+ | 1.0+ | 4.0+ | 1.0+

## Event Detail

Event | IE | Netscape | Mozilla | Opera | Safari
--- | --- | --- | --- | --- | ---
onactivate Fires when the element becomes active. | 4.0+ | no | no | no | no
onafterupdate Fires when the data from a datasource is successfully updated for a databound object. | 4.0+ | no | no | no | no
onbeforedeactivate Fires immediately before the element stops being the active element. | 4.0+ | no | no | no | no
onbeforeupdate Fires immediately before the data from a datasource is updated for a databound object. | 4.0+ | no | no | no | no
onblur Fires when the element loses focus. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
onclick Fires when the element is clicked. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
oncontrolselect Fires immediately before the element is selected. | 4.0+ | no | no | no | no
ondblclick Fires when the element is double-clicked. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
ondeactivate Fires when the active element becomes inactive. | 4.0+ | no | no | no | no
onerrorupdate Fires when an error occurs while updating the datasource of a databound object. | 4.0+ | no | no | no | no
onfocus Fires when the element receives focus. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
onload Fires when the content of the element finishes loading. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
onmove Fires when the element moves. | 4.0+ | no | no | no | no
onmoveend Fires when the element stops moving. | 4.0+ | no | no | no | no
onmovestart Fires immediately before the element moves. | 4.0+ | no | no | no | no
onreadystatechange Fires when the ready state of the element changes. | 4.0+ | no | no | no | no
onresizeend Fires when the element is finished being resized. | 4.0+ | no | no | no | no
onresizestart Fires immediately before a user resizes the element. | 4.0+ | no | no | no | no
ontimeerror Fires when a time-related error occurs. | 4.0+ | no | no | no | no

## Availability

W3C HTML 4.01

text_html aptana_docs