HTML <iframe> marginheightAttributes

HTML iframe 标签参考手册HTML <iframe> Tag

Examples

An <iframe> with 50 pixels of top and bottom margin:

<iframe src="demo_iframe.htm.html" marginheight="50">
</iframe>

Try it Yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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 标签参考手册HTML <iframe> Tag Other Extensions