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

On 4th Quiz, HTML?

On 4th Quiz, why can't i'm unable to print the output, as it says "Your paragraph needs to go in between <body></body> tags what that mean?

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>
  <h1> "My first paragraph!"</h1>
</head>

<body>

  <p>"My first Paragraph!"</p>

</body>
</html>
Adam Sommer
Adam Sommer
62,470 Points

It means the the paragraph element needs to be inside the body element:

For example the strong element below is inside the p (paragraph element):

<p>
  <strong>This element is inside a p element.</strong>
<p>

1 Answer

Zain Sra
Zain Sra
3,237 Points

Hi ,

Your put paragraph inside head tags ,

<head>
<h1>paragraph</h1>
</head>

The text, fields, headings which you want to display always go in <body> </body> tags

so try to put the above <h1></h1> tag inside the <body></body> tag, but the challenge says you to put paragraph in <p></p> tags

Like this,

<!--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>
</head>

<body>

  <p>"My first Paragraph!"</p>

</body>
</html>

I hope it answers your question , happy Coding :)

  • Zain

Thank You So Much! i got the answer!, that header file is just for fun! but it really doesn't matter it all.