Why some elements start on a new line and others flow within text, and how display changes that.
Every HTML element has a default display behavior. Block-level elements such as div, p, h1 and ul start on a new line and stretch to fill the available width, while inline elements such as span, a, strong and img sit within the flow of text and only take the space their content needs. Width and height apply to block elements, but are ignored on inline ones, and vertical margin and padding behave differently too.
The CSS display property lets you change this default: inline-block gives you inline flow with block-style sizing, and none removes the element entirely. A frequent interview question is whether a block element can sit inside an inline one — in the HTML content model, placing a div inside a span is invalid, although an a element is a special case that can wrap block content in HTML5. Understanding this distinction is the foundation for grasping layout behavior later.
What you'll walk away knowing