margin-block
A logical shorthand for 'margin-block-start' and 'margin-block-end'. It sets the vertical spacing (top and bottom) in one line.
Usage example
.card {
/* Adds 20px space to both top and bottom logically */
margin-block: 20px;
} Initial value
See individual properties
Inherited
No
Applies to
sameAsMargin
Animation type
length
Values
margin-top margin-block Browser Support
Widely available Since 2021 95% global usage
This feature is well established and works across many devices and browser versions. It has been available across browsers since 2021.
Safe to use without fallbacks.
87+
66+
14.1+
87+