Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML Treehouse Club: HTML Publish a Story HTML Structure

Michael Hay
Michael Hay
1,311 Points

Inserting a new paragraph between bodies.

Having trouble with an HTML module. The problem is to insert a new paragraph between the bodies.

This keeps coming up.

Your paragraph needs to go between the <body></body> tags.

index.html
<!--This is my story, but you should insert your own story below. Use the <p> tag to start a new paragraph and </p> at the end of each paragraph.-->
<!DOCTYPE html>
<html>
<head>

  <title>Argh</title>
  <meta charset="utf-8">

 <style>
    h1 {text-align: center; color: green}
    h2 {text-align: center; color: pink}
 </style>

</head>

<body>


  <h1>Peg Leg</h1>
    <h2>By Joy Kesten</h2>

  <p> My first Paragraph! </P>


</body>
</html>

2 Answers

Connor Carlier
Connor Carlier
444 Points

It's hard to say for certain considering your <p> tags are within the body paragraph, but I would try removing the white space after <p> and before </p>. Technically I believe html should still be able to read it but I've seen this cause issues in a few select cases.

Gabriel Pierce-Lackey
Gabriel Pierce-Lackey
11,012 Points

Remove the comment at the top of the code.

The

<!--This is my story, but you should insert your own story below. Use the <p> tag to start a new paragraph and </p> at the end of each paragraph.-->

it's registering the p tags in that for some reason and saying its not in the body tag.

Michael Hay
Michael Hay
1,311 Points

Gabriel, thank you so much. This did the trick!