HTML <iframe> marginwidthAttribute
Examples
An <iframe> with 50 pixels of left and right margins:
<iframe src="demo_iframe.htm.html" marginwidth="50">
</iframe>
</iframe>
Try it Yourself »
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the marginwidth attribute.
Definition and Usage
HTML5 does not support the <iframe> marginwidth attribute. Use CSS instead.
The marginwidth attribute specifies the left and right margins of the content of an <iframe>, in pixels.
Syntax
<iframe marginwidth="pixels">
Attribute Values
| Value | Description |
|---|---|
| pixels | Specifies the left and right margins of the content of an <iframe>, in pixels. |
HTML <iframe> Tag Other extensions