w3resource

HTML marginheight attribute

marginheight

The purpose of the HTML longdesc attribute is to specify a link to a long textual description for images, iframes and frames.

The purpose of the HTML marginheight attribute is to specify the height of the margins in a frame or iframe.

Supported elements

HTML marginheight attribute supports iframe and frame elements.

Syntax

<ElementName marginheight="value" >.....</ElementName>

Where ElementName is any supported elements.

Type of value

Pixel.

Value

A value in pixels.

Default value

There is no default value of HTML marginheight attribute.

Supported doctypes

HTML 4.01 frameset.

Example of HTML marginheight attribute with frame

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Example of HTML marginheight attribute with frame</title>
</head>
<frameset rows="20%,*,20%" >  
<frame src="header.html" frameborder="1"  name="header" title="Header window"/>  
<frame src="content.html" frameborder="0"  name="content" title="Content window" marginheight="10"/>
<frame src="footer.html" frameborder="0"  name="footer" title="footer window" marginheight="10"/> 
</frameset>
</body>
</html>

Result

html marginheight attribute with frame

View this example in a separate browser window

Example of HTML marginheight attribute with frame

Example of HTML marginheight attribute with iframe

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Example of HTML longdesc attribute with iframe</title>
</head>
<body>
<iframe src="../../sql/customer.php" height="100%" width="540" frameborder="1" title="The customer information " marginheight="10" > </iframe> 
</body>
</body>
</html>

Result

html marginheight attribute with iframe

View this example in a separate browser window

Example of HTML marginheight attribute with iframe

Previous: HTML longdesc attribute
Next: HTML marginwidth attribute

Test your Programming skills with w3resource's quiz.



Follow us on Facebook and Twitter for latest update.