Name

iframe — HTML 4.01 | HTML5

Synopsis

<iframe> . . . </iframe>

Defines an inline (floating) frame that is used for embedding an HTML document in a separate browsing context (window) within the parent document. An inline frame displays the content of an external document and may display scrolling devices if the content doesn’t fit in the specified window area. Inline frames may be positioned similarly to images. The content of the iframe element (between the start and end tags) displays in browsers that do not support inline frames.

Start/End Tags

Required/Required

Attributes

Core, HTML5 Global Attributes

align="top|middle|bottom|left|right"

Deprecated. Not in HTML5. Aligns the inline frame on the page within the flow of the text. Left and right alignment allows text to flow around the inline frame.

frameborder="1|0"

Not in HTML5. Turns on or off the display of a 3D border for the inline frame. The default is 1, which displays the border.

height="number"

Specifies the height of the inline frame in pixels or as a percentage of the window size.

hspace="number"

Nonstandard. Not in HTML5. Used in conjunction with left and right alignment, this attribute specifies the amount of space (in pixels) to hold clear to the left and right of the inline frame.

longdesc="URL"

Not in HTML5. Specifies a link to a document containing a long description of the inline frame and its contents.

marginheight="number"

Not in HTML5. Specifies the amount of space (in pixels) between the top and bottom edges of the inline ...

Get HTML & XHTML Pocket Reference, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.