The HTML <iframe></iframe> element creates an inline frame that contains another document. Use CSS to style this element, even to include scrollbars.


Attribute Value Description
frameborder 1
height pixels
Defines the height.
longdesc URL Deprecated
marginheight pixels Deprecated
marginwidth pixels Deprecated
name framename Specifies a unique name.
sandbox allow-forms
Defines restrictions to the frame content.
scrolling yes
seamless seamless If present, the <iframe> should appear as if it is part of the document it is in.
src URL The URL of the document to show in the frame.
srcdoc HTML The HTML of the document showing in the frame.
width pixels
Defines the width.

HTML example:

<iframe src=""></iframe>

Live inline frame example:

This is a live example of an inline frame. The Facebook like box is rendered using the <iframe> element. You can view the source code below:

Iframe Example

Source code for the Facebook like box. Notice the inline frame element.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.