LESSON 2.3
The Paragraph <p> and Break <br> Tags
The first tags you'll use in nearly every project
Learn how to add text to a webpage using the paragraph tag, and how the line break tag gives you control over where text starts a new line.
💡 The Concept
Paragraph Tags: <p>
The HTML paragraph tag is one of the first elements you will learn, and it appears on virtually every webpage ever built. The paragraph tag is probably the most frequently used element on the web. It wraps blocks of text and automatically adds spacing above and below. We’ll learn more about that spacing in future lessons.
Line Break Tag: <br>
Sometimes you need a line break within a block of content without starting a whole new paragraph. That’s where <br> comes in. The <br> tag to make a new line doesn’t add extra space like the <p> tags does. Note that this is a self-closing tag; it doesn’t have a closing tag because it doesn’t wrap any content.

🎬 Video Demonstration
This video demonstrates how to use the <p> and <br> tags to achieve the look that you want.
Exercise: Try It Yourself
Either in JSFiddle or in template/index.html, try adding some paragraphys with <p> tags, and then try it with a line break. The screenshot below shows the result in JSFiddle.

Here is another example for you to try. When you make an address, it is necessary to use the <br> tags, otherwise you have too much space between each address line. As you can see, the <p> tags add extra margin at the top and bottom of each line, and that isn’t the right look for an address.

❓ Frequently Asked Questions
Yes. Text typed directly inside the body element without any tag is called bare text. It will show up in the browser, but it has no semantic meaning and no reliable styling. Every block of text needs to be inside a tag. For regular paragraphs, that tag is p.
HTML ignores whitespace in your code, including line breaks. Pressing Enter in your editor does nothing to what the browser displays. To move to the next line you need a br tag. To start a new paragraph with space above and below, you need p tags.
The p tag creates a block with margin above and below. It signals a new paragraph. The br tag just moves to the next line with no extra spacing. Use p for separate thoughts, and br for things like addresses or poetry where lines belong together but need to break.
Use br when content belongs in the same block but needs to wrap to the next line. Addresses are the classic example: each line belongs together, but using p tags would add too much space between them. Use p when you are starting a new thought that deserves its own breathing room.
★ Key Takeaways
Paragraphs and line breaks are the basics of putting text on a web page. This lesson covered the p tag for paragraphs and the br tag for adding a line break without starting a whole new paragraph. Next, you will learn about HTML headings, which go from h1 to h6. Headings organize your page and are important for both readability and search engines.
Google Ads
The costs of this website are partially offset by revenue from Google Ads.Tools of the Trade
HTML/CSS Lessons
-
-
-
1.3. HTML Tag Preview
-
-
-
2.2. The HTML Framework
-
-
2.4. HTML Headings
-
-
-
-
-
-
3.01. Introduction to CSS
-
3.02. How CSS Cascades
-
-
-
-
3.05. CSS Colors
-
3.06. RGBA Colors
-
-
3.08. Font and Text Properties
-
3.09. Classes and IDs
-
-
-
-
-
4.3. HTML Embedded Images
-
-
-
-
-
-
5.1. CSS Borders
-
5.2. CSS Border Radius
-
5.3. CSS Gradients
-
5.4. CSS Box Shadows
-
5.5. CSS Text Shadows
-
7.1. The Display Property
-
-
-
7.4. The Box Model
-
-
-
-
-
-
9.1. Website Tables
-
9.2. HTML Forms
-
-
9.4. Special Form Fields
-
9.5. Embedding Multimedia
-
-
9.7. Keyboard Shortcuts
-
10.1. What Is a Framework?
-
10.2. Font Awesome Icons
-
-
10.4. Bootstrap Grid System
-
-
10.6. Bootstrap Navigation
-
-
11.2. Purchasing a Domain Name
-
11.3. Website Hosting
-
11.4. Nameservers and DNS
-
11.5. FTP
-
11.6. GitHub Pages
