CSS Margin Property

CSS 1

CSS 2

CSS 3

Yes Yes Yes

Description

Sets the margin properties. Used as a type of shortcut, instead of listing each property separately.

Syntax

margin: [value1] [value2] ...

Possible values

  • [margin-width]
  • inherit

Initial Value

Not Defined

Applies To

All elements

Inherited

No

Media

Visual

Example

body {margin: 10px 25px 15px 25px;}


View All CSS Properties