CSS Margin-top Property

margin-top is used to set, or change the default top-margin of a given element, for instance h1 may have a top-margin by default.

Possible Values

Example:

The following example removes the top-margin of h1 headings.

h1 {
  margin-top: 0;
}

Inherited? NO!

Post comment

Links that you insert are not nofollowed, but will be removed by admins if they are considered spam.

[url=Absolute URL for page]TITLE[/url]

You should insert code boxes around code examples, which will be automatically syntax highlighted.

[code1 html|css|javascript|php|sql]Your Code Here[/code1]

You may want to read our Privacy Policy before submitting your comment.