Name

margin-top

Synopsis

Specifies the width of the top margin for an element. Negative values are permitted.

Values:

<length> | <percentage> | auto | inherit

Initial value:

0

Applies to:

All elements (except elements with table display types other than table and inline-table).

Inherited:

No.

Percentages:

Refer to width of the containing block.

Computed value:

Percentage values or absolute length as specified.

Get Web Design in a Nutshell, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.