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

leftMargin attribute (body)

Browser support:
Sets the left margin for the document body in pixels.
This attribute is deprecated. Use the margin-left style property instead.
JavaScript page for this attribute: leftMargin. You can find other example(s) there.

Possible values:

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

Example HTML code 1:

This example illustrates the use of the leftMargin attribute:
<body leftmargin="100px">
    The left margin is 100px.
</body>
Did you find this example helpful? yes no

Example HTML code 2:

Recommendation:
<body style="margin-left:100px">
    The left margin is set with <i>margin-left</i> style property.
</body>
Did you find this example helpful? yes no

Supported by tags:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content