Display property in CSS is the property that determines how the element will flow with the rest of the elements on the page. Since all elements are essentially various sized rectangles, the display property allows us to indicate how we want each rectangle to meld with other rectangles.
For instance, the default property for display is ‘inline’. For instance, if you took text in a
and wrapped a portion of it in a , that span would default to inline, and it would not break the flow of the text. You could color the background of the span if you wanted, and also set specific margin and padding, however inline elements do no accept input for width and height.
‘Inline-block’ is similar, in that it will not interrupt the flow, but you may add inputs for width and height, to further separate and draw attention to the element.
‘Block’ is a property that is set by default on a number of elements in the browser UA stylesheet. A block element will break past any other items that are inline with it. An ele