Block, Inline & Inline-block. What’s the difference?


Block elements
Three paragraph elements with red background. Paragraph elements are set to block value by default, hence they cause a newline.


Inline elements
Three anchor tags with red background. These tags resist newlines


Elements with Display set to Inline-block
Anchor tags with display set to inline-block. They can have height and width, and resist the newlines as well



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store