Block elements like <div> or <p> take the full width and start on a new line. Inline elements like <span> or <a> only take the space their content needs and flow inside a line.
The correct CSS value to make an element behave like inline-block is inline-block. Other options are invalid CSS values and cause the property to be ignored.
<style>
.box { width: 5rem; height: 5rem; background: coral; margin: 0.5rem; }
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }
</style>
<div class="block box">Block</div>
<div class="inline box">Inline</div>
<div class="inline-block box">Inline-block</div>The block element takes full width and appears on its own line. The inline and inline-block elements flow inline, so they appear side by side on the same line.
display: inline-block?CSS does not have a direct selector for computed styles like display. But if inline styles are used, [style*='inline-block'] matches elements whose style attribute contains 'inline-block'. Other options are invalid or select by class, not display.
display: inline-block on interactive elements?Inline-block changes visual layout but does not change the element's semantic role or default accessibility behavior. Inline-block elements behave like inline elements for accessibility, so they do not receive keyboard focus unless made focusable (e.g., with tabindex).