Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM IFrame height property

IFrame height property

Frame/IFrame Object Reference Frame/IFrame Object


Definition and Usage

The height property sets or returns the value of the height attribute of an iframe element.

The height attribute specifies the height of the iframe (in pixels or as a percentage).

Syntax

iframeObject.height=

value

The height property can have the following values:

Value Description
pixels The height can be specified in pixels (e.g. "100px" or "100")
% The height can be specified as a percentage (e.g. "20%")

Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the height property


Example

Example

Change the height and width of the iframe:

Runoob Tutorial(runoob.com)

    



Try it »


Frame/IFrame Object Reference Frame/IFrame Object