<iframe>...</iframe>

HTML4 HTML5

The <iframe> tag specifies an inline frame embedded into the document at the tag's location. Used to embed content from an external source.

Both opening and closing tags are required.

Attributes:

align="..." - (left, right, top, middle, bottom) Alignment of <iframe> relative to surrounding elements. Not in HTML5.

frameborder="..." - (0 - no, 1 - yes, default) Specifies frame border display. Not in HTML5.

height="..." - Frame height in pixels.

longdesc="..." - URL to a page containing a long summary of the frame content. Not in HTML5.

marginheight="..." - Top and bottom margins in pixels. Not in HTML5.

marginwidth="..." - Left and right margins in pixels. Not in HTML5.

name="..." - Frame name.

sandbox="..." - (allow-forms, allow-pointer-lock, allow-popups, allow-same-origin, allow-scripts, allow-top-navigation) Sets security restrictions on embedded content.

scrolling="..." - (yes, no, auto) Specifies scrollbars display. Not in HTML5.

src="..." - URL of the page embedded in the iframe.

srcdoc="..." - Inline HTML code to show inside the frame.

width="..." - Frame width in pixels.

Example

Code:

<iframe src="http://alg24.com/ramka_1.html" frameborder="1">Text displayed when the browser does not support iframe elements</iframe>

Will yield: