iframe (HTML4 & HTML5)

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

Properties & Events

KeyDescriptionAvailability
alignDefines the alignment of the element.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
classCSS class assigned to the element.
chrome 1.0safari 1.0Firefox 1.0ie 1.0opera 1.0
frameborderSpecifies whether the frame has a border.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
heightHeight of the element (in pixels).
chrome 1.0safari 1.0Firefox 1.0ie 1.0opera 1.0
hspaceNumber of pixels of space to the left and right of the element (i.e. horizontal margin).
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
idUnique identifier for the element.
chrome 1.0safari 1.0Firefox 1.0ie 1.0opera 1.0
langLanguage code for the content of the element.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
languageScript language for the element.
chrome 1.0safari 1.0Firefox 1.0ie 3.0opera ??
longdescURL that contains a long description of the contents of the element.
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 4.0
marginheightTop and bottom margins (in pixels) for the document.
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 7.0
marginwidthLeft and right margins (in pixels) for the document.
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 7.0
nameUnique name identifier for the element.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
scrollingSpecifies whether or not the element has scroll bars.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
srcURL for the source for the element.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 1.0
styleInline style for the element.
chrome 1.0safari 1.0Firefox 1.0ie 1.0opera 1.0
tabindexPosition of the element in the tabbing order for the document.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
titleShort text description for the element.
chrome 1.0safari 1.0Firefox 1.0ie 1.0opera 1.0
vspaceNumber of pixels of space above and below the element (i.e. vertical margin).
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 7.0
widthWidth of the element (pixels or percentage).
chrome 1.0safari 1.0Firefox 1.0ie 1.0opera 1.0
onblurFires when the element loses focus.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onclickFires when the element is clicked.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
ondblclickFires when the element is double-clicked.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onfocusFires when the element receives focus.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onloadFires when the content of the element finishes loading.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0

Examples having uses of: 'iframe'

0 votes
1k views

JavaScript iframe height

The Frame and Iframe represents html frame and iframe respectively.This DOM object has all the properties that a HTML element has. We can change these properties using javascript.