HTML & CSS Basics
chapter 08 · Layout Basics with Flexboxstep 1 / 10 mode · learn
Flow, block, inline

Block vs inline

By default, HTML elements come in two flavours: • Block elements (<div>, <p>, <h1>, <section>) start on a new line and take up the full width available. • Inline elements (<a>, <span>, <strong>) sit next to each other in a line and only take the space their content needs. This is 'normal document flow' — the arrangement you get for free.

why it matters

Every layout tool (Flexbox, Grid) is a way to *override* this default flow. If you don't understand the default, the overrides feel arbitrary.