Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML Introduction to HTML and CSS (2016) HTML: The Structural Foundation of Web Pages and Applications Paragraph Tags

1:38 "Second Paragraph has a Bottom Margin"

To me, it seems unclear as if the second paragraph text (inner) has the margin or simply the <p>paragraph</p> text causes the "third paragraph" to have leading space (or second has trailing space).

1 Answer

Thurston Daly
seal-mask
.a{fill-rule:evenodd;}techdegree
Thurston Daly
Full Stack JavaScript Techdegree Student 11,810 Points

From what I'm seeing, the <p> and </p> tags will add margin before and after the text. This is why you see a space before the text not using the <p> tags that is entered immediately after the </p> but no space when text is added following text without a </p>

That is exactly my understanding, <p></p> ensures that inside text is treated as a separate paragraph. Text typed after </p> will automatically start after the margin.