margin-block

The margin-block CSS property is shorthand for margin-block-start and margin-block-end.

Syntax

CSS

margin-block: value;

JS

object.style.marginBlock = "value";

Values

<'margin-block'> = <'margin-top'>{1,2}
<'margin-top'> = <length-percentage> | auto
<length-percentage> = [ <length> | <percentage> ]
<length>

Specifies the length using a number followed by a unit of measurement.

<percentage>

Specifies the percentage using a number followed by a percent sign (%).

auto

Automatically specified by the user agent.

Examples

auto

length

percentage

JS

Internal

margin-block-end

margin-block-start

margin-inline

margin-inline-end

margin-inline-start

External

World Wide Web Consortium (W3C)

Home Menu