You are here: Reference > HTML > attributes > topMargin (body)

topMargin attribute (body)

Browser support:
Specifies the thickness of the top margin in the document body.
This attribute is deprecated. Use the margin-top style property instead.
JavaScript page for this attribute: topMargin. You can find other example(s) there.

Possible values:

String that sets the thickness of the top margin, with an integer optionally followed by a 'px' (pixel) unit designator.
Default: 15.

Example HTML code 1:

This example illustrates the use of the topMargin attribute:
<body topmargin="130">
    Some HTML content
</body>
Did you find this example helpful? yes no

Example HTML code 2:

Recommendation:
<body style="margin-top:230px">
    Some HTML content
</body>
Did you find this example helpful? yes no

Supported by tags:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content