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

HTML DOM IFrame width property

IFrame width property

Frame/IFrame Object Reference Frame/IFrame Object


Definition and Usage

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

The width attribute specifies the width of the iframe.

Syntax

iframeObject.width=

value

The width property can have the following values:

Value Description
pixels In pixels (e.g. "100px" or "100")
% As a percentage of the width (e.g. "20%")

Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the width property


Example

Example

Change the height and width of the iframe:

Runoob Tutorial(runoob.com)

    



Try it »


Frame/IFrame Object Reference Frame/IFrame Object