Block and Inline
Every element is either block-level or inline by default, which decides how it flows on the page.
- Block elements start on a new line and fill the width, like
<div>,<p>, and<h1> - Inline elements sit within a line and take only as much width as needed, like
<span>,<a>, and<b>
You can change this behavior later with the CSS display property.
Try it yourself
Loading editor…