HTML » Tags » iframe

Version: 4.0

Compability: Explorer 4, 5  Netscape 6

Syntax:
<iframe> ... </iframe>

The <iframe> tag is used to insert an inline frame into the body of an HTML document. This is a very convenient method for inserting an HTML page inside another HTML page. Unlike the frameset, frame, and noframes tags, the iframe tag can only be used inside a body element. You must not place the iframe tag inside a frameset element.

An iframe element displays content, including forms, images, multimedia, other frames, tables, etc. It is very important to understand that the only way to assign content to an iframe is to assign a URL using the src attribute. Whatever content is displayable at the referenced URL will in turn be displayed inside the iframe.
 
You can place a default textual message between the opening and closing iframes tags. This will only display if the browser does not recognize inline frames.
 
The closing tag is mandatory.
 

Examples

Code:
<iframe width="50%" height="77" src="html_frames_yellow_two.html" frameborder="yes" scrolling="yes">
Sorry, you need inline frames to fully see this page.
</iframe>
Output:
Language(s): HTML

See Also: