CSS | margin-block Property Last Updated : 28 Jun, 2022 Comments Improve Suggest changes Like Article Like Report The margin-block property is used to define the logical block end margin of an element. This property helps to place margin depending on the element's writing mode, directionality, and text orientation.Syntax: margin-block-end: length | auto | initial | inherit | unset; Property values: length: Sets a fixed value defined in px, cm, pt. Negative values as mentioned earlier are allowed. 0 px is the default value.auto: It is used when it is desired that the browser determines the width of the left margin.initial: It is used to set the value of the margin-left property to its default value.inherit: It is used when it is desired that the element inherit the margin-left property of its parent as its own.unset: It is used unset the default margin-block. Below examples illustrate the margin-block property in CSS:Example 1: html <!DOCTYPE html> <html> <head> <title>CSS | margin-block Property</title> <style> h1 { color: green; } div { background-color: yellow; width: 110px; height: 80px; } .two { margin-block: 20px 40px; background-color: purple; } </style> </head> <body> <center> <h1>Geeksforgeeks</h1> <b>CSS | margin-block Property</b> <br><br> <div class="one">GeeksgforGeeks</div> <div class="two">GFG</div> <div class="three">GeeksforGeeks</div> </center> </body> </html> Output: Example 2: html <!DOCTYPE html> <html> <head> <title>CSS | margin-block Property</title> <style> h1 { color: green; } div { background-color: yellow; width: 110px; height: 80px; } .two { margin-block: auto; writing-mode: vertical-lr; background-color: purple; } </style> </head> <body> <center> <h1>Geeksforgeeks</h1> <b>CSS | margin-block Property</b> <br><br> <div class="one">GeeksforGeeks</div> <div class="two">GFG</div> <div class="three">GeeksforGeeks</div> </center> </body> </html> Output: Supported Browsers: The browser supported by margin-block property are listed below: Google Chrome 87Edge 87Mozilla Firefox 66Opera 73Safari 14.1 Comment More infoAdvertise with us Next Article CSS | margin-block Property S skyridetim Follow Improve Article Tags : Web Technologies CSS CSS-Properties Similar Reads CSS scroll-margin-block property The scroll-margin-block property is used to set all the scroll margins to the start and end of a scroll element at once. This property is shorthand for the scroll-margin-block-start and scroll-margin-block-end property.The selection of the start and end sides depends upon the writing mode. The start 2 min read CSS | padding-block Property The padding-block property in CSS is used to define the logical block start and end padding of an element. This property helps to place padding depending on the elementâs writing mode, directionality, and text orientation.Syntax: padding-block: length|percentage|auto|inherit|initial|unset; Property 2 min read CSS margin-bottom Property The CSS margin-bottom property is used to specify the amount of margin to be used on the bottom of an element. The margin can be set in terms of length or percentage. Syntax:margin-bottom: <length> | <percentage> | autoProperty values:Length: This value specifies the length of the margin 3 min read CSS | min-block-size Property The min-block-size property in CSS is used to create the minimum horizontal or vertical size of an element. If the writing direction is horizontal then min-block-size is equivalent to min-height property, and if it is in vertical mode then equal to min-width property. Syntax: min-block-size: length| 2 min read CSS scroll-margin-block-end property The scroll-margin-block-end property is used to set all the scroll margins to the end side of a scroll element at once. This property defines the margin of the scroll snap area at the end of the block dimension that is used for snapping this box to the snap port. Syntaxscroll-margin-block-end: lengt 2 min read CSS | max-block-size Property The CSS max-block-size property is used to create the maximum size of an element in the direction opposite that of the writing direction. Like if the writing direction is horizontal then max-block-size is equivalent to max-height, and if it is in vertical mode then equal to max-width. Syntax: max-bl 2 min read CSS | padding-block-end Property The padding-block-end property in CSS is used to define the logical block end padding of an element. This property helps to place padding depending on the elementâs writing mode, directionality, and text orientation. Syntax: padding-block-end: length|percentage|auto|inherit|initial|unset; Property v 2 min read CSS margin-top Property The margin-top property in CSS is used to set the top margin of an element. It sets the margin area on the top of the element. The default value of the margin-top property is 0. Syntax:margin-top: length|auto|initial|inherit;Property values:length: It is used to specify the length of the margin with 4 min read CSS margin-left Property The margin-left property in CSS is used to set the width of the margin on the left of the desired element. Negative values of this property are allowed.A positive value is used when it is desired that the margin is farther away from its neighbors.A negative value is used when it is desired that the 3 min read CSS | padding-block-start Property The padding-block-start property is used to define the logical block start padding of an element. This property helps to place padding depending on the elementâs writing mode, directionality, and text orientation. Syntax: padding-block-start: length|percentage|auto|inherit|initial|unset; Property va 2 min read Like