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