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 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 Plackey
Gabriel Plackey
11,064 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!