As you write HTML, there’s a moment that makes you go “huh?” — even when you break the line in your editor, the screen doesn’t break it. That’s because HTML collapses the line breaks and gaps inside your text into “a single space.” Let’s try writing this and see.
<p>Good morning
Hello
Good evening</p>Even though it looks like three lines in the editor, in the browser it shows up as “Good morning Hello Good evening” — all on one line, joined by a single space. To HTML, neither the line breaks nor the indentation spaces count as “separators.” That’s what these two small tags are for.
Break a line with <br>
Put a <br> wherever you want to “start a new line right here” in the middle of your text.
<p>Piyo Building, 3F<br>123 Main Street<br>Anytown, CA 90001</p><br>, so the address splits into three lines.When you want to break the line within a single unit, like an address or a haiku — that’s where <br> comes in. For a haiku, you can write it like this.
<p>An old pond—<br>a frog jumps in,<br>the sound of water.</p><br> is, so the haiku becomes three lines.The three-line haiku stays inside a single <p>, breaking only where the <br> tags are. It’s “a line break within one unit,” not “separate paragraphs” — and that difference shows up in how you choose your tags too.
Draw a divider with <hr>
Where the topic changes completely, <hr> lets you draw a single horizontal line.
<h2>Today's events</h2>
<p>The weather was nice this morning.</p>
<hr>
<h2>Tomorrow's plan</h2>
<p>I'm going to the park.</p><hr>, a horizontal line appears to show where the topic breaks.You can show a break — “the story switches here” — as a line.
Summary of this lesson
<br>makes a line break in the middle of text (no closing tag)<hr>draws a divider where the topic breaks (no closing tag)- Don’t stack up
<br>tags to make space — handle the spacing later with CSS
