HTML <iframe> width attribute
Definition and Usage
width
The attribute specifies the width of the iframe in pixels.
Default width is 300 pixels.
Example
Specify the height and width of the <iframe> to be 200 pixels:
<iframe src="/index.html" width="600" height="600"></iframe>
Syntax
<iframe width="pixels">
Attribute Value
Value | Description |
---|---|
pixels | Specifies the width of the inline frame (in pixels) (for example, "100px" or "100"). |
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |