English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag Reference

HTML: <iframe> marginwidth attribute

The marginwidth attribute specifies the left and right blank spacing of the <iframe> content in pixels. HTML5 The marginwidth attribute of <iframe> is not supported. Please use CSS instead.

 HTML <iframe> tag

Online Example

<iframe> with left and right margins of30 pixels:

<iframe src="demo-iframe.html" marginwidth="30"></iframe>
Test it out ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the marginwidth attribute.

Definition and Usage

HTML5 The marginwidth attribute of <iframe> is not supported. Please use CSS instead.

The marginwidth attribute specifies the left and right spacing of the <iframe> content in pixels.

Syntax

<iframe marginwidth="pixels">

Attribute Value

ValueDescription
pixelsSpecify the left and right spacing of the <iframe> content in pixels.
 HTML <iframe> tag