X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

Frame/IFrame marginHeight Property

Frame/IFrame Object Reference Frame/IFrame Object

Definition and Usage

The marginHeight property sets or returns the value of the marginheight attribute in a frame/iframe element.

The marginheight attribute specifies the top and bottom margins of an frame/iframe, in pixels.

Syntax

frameObject.marginHeight=pixels

or

iframeObject.marginHeight=pixels


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The marginHeight property is supported in all major browsers.


Example

Example

Return the value of the marginheight attribute:

<html>
<body>

<iframe id="myframe" src="demo_iframe.htm" marginheight="50" marginwidth="50">
<p>Your browser does not support iframes.</p>
</iframe>
<br><br>

<p>The value of the marginheight attribute is:
<script>
document.write(document.getElementById("myframe").marginHeight);
</script>
<p>

</body>
</html>

Try it yourself »


Frame/IFrame Object Reference Frame/IFrame Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook