DEV Community

CSS : Inline vs Inline-Block, vs Block

Nilesh Raut on October 17, 2023

Introduction When it comes to crafting beautiful and functional web pages, CSS (Cascading Style Sheets)is our trusty tool. But within t...
Collapse
 
lixeletto profile image
Camilo Micheletto

In my opinion, there are few cases where we need to change the display of a property to block, inline, or inline-block. First, because all elements have a default display property that corresponds to their purpose, such as inline for in-text elements and block for section elements. Second, because we usually use flex and grid to organize the layout, so it is more common to work with the outer display being a flex-item/grid-item, leaving little room for these others in the most common use cases.