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

Inside your body element, put in a paragraph that says, "My first paragraph!"

need help

index.html
<!DOCTYPE html>
<html></html>
<html><head></head><body></body></html>
<html><body></body>
Trent Stenoien
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Trent Stenoien
Full Stack JavaScript Techdegree Graduate 20,034 Points

You actually have the basis here where you say the following, but it helps to separate it.

<html><head></head><body></body></html>

Or said another way. <start HTML><start head></end head><start body></end body></end HTML>

Then you simply add <p>Paragraph text</p> inside the body of the page. Here's how I would write it.

<!DOCTYPE HTML>
<html>
  <head>
  </head>
  <body>
    <p>"My first paragraph!"</p>
  </body>
</html>

3 Answers

iuliana sagaidak
iuliana sagaidak
4,797 Points

First fix the code you write already, because you have so much of html and body elements. The line in the middle and doctype it's ok.

<!DOCTYPE html>
<html>
  <head>
  </head>
  <body>
  </body>
</html>

Then add a paragraf tag inside of body, so between opening and closing body tag:

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

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

iuliana sagaidak
iuliana sagaidak
4,797 Points
<!DOCTYPE html>
<html>
  <head>
  </head>
  <body>
     <p>"My first paragraph!"</p>
  </body>
</html>
Michael Ramnarine
Michael Ramnarine
12,290 Points

This is the simplest way to display "My first paragraph" to the browser. The code should read like this, opening html with doctype, then opening head and whatever you need in the head (links to css files or fonts), closing head, opening body and your body content (the paragraph tag for example) then closing body, and finally the closing html tag with no doctype needed.

<!DOCTYPE html>
   <head>
   </head>
   <body>
      <p>"My first paragraph!"</p>
   </body>
</html>