← Web basics: HTML, CSS and JavaScript
Paragraphs and emphasis
p, br, strong and em, and why extra spaces disappear.
Body text goes in paragraphs, <p> ... </p>. Browsers ignore extra spaces and line breaks you type in your HTML: any run of spaces and new lines becomes a single space. That is why each paragraph needs its own <p>. Inside text, <strong> marks something important (shown bold) and <em> adds stress or emphasis (shown italic). For a line break inside the same paragraph, such as in an address or a poem, use <br>.
<p>Please <strong>do not</strong> feed the ducks bread.</p>
<p>It is <em>really</em> bad for them.</p>
<p>City Park<br>12 Lake Road</p>Three separate paragraphs. "do not" is marked important, "really" is stressed, and the address keeps its two lines thanks to <br>.
Use <br> only for line breaks that are part of the content (addresses, poems). Do not stack several <br> tags to make space; spacing is a job for CSS.
<b> and <i> also make text bold and italic, but <strong> and <em> carry meaning, so screen readers can treat them differently.