English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
This article introduces the HTML iframe marginheight attribute, which specifies the top and bottom blank space of the <iframe> content in pixels, and demonstrates how to use the HTML iframe marginheight attribute, browser compatibility, syntax definition, and detailed information about its attribute values through online examples.
An <iframe> with top and bottom margins of30 pixels:
<iframe src="demo-iframe.html" marginheight="30"></iframe>Test and see ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the marginheight attribute.
HTML5 The marginheight attribute of <iframe> is not supported. Please use CSS instead.
The marginheight attribute specifies the top and bottom blank margin of the <iframe> content in pixels.
<iframe marginheight="pixels">
Value | Description |
---|---|
pixels | Specify the top and bottom margin of the <iframe> content in pixels. |