IFrame width property
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





All major browsers support the width property
Example
Example
Change the height and width of the iframe:
Try it »
Frame/IFrame Object