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 trialJames Bell
542 PointsInside your body element, put in a paragraph that says, "My first paragraph!"
need help
<!DOCTYPE html>
<html></html>
<html><head></head><body></body></html>
<html><body></body>
3 Answers
iuliana sagaidak
4,797 PointsFirst 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>
James Bell
542 PointsStates Your paragraph needs to go between the <body></body>tags
iuliana sagaidak
4,797 Points<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>"My first paragraph!"</p>
</body>
</html>
Michael Ramnarine
12,290 PointsThis 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>
Trent Stenoien
Full Stack JavaScript Techdegree Graduate 21,632 PointsTrent Stenoien
Full Stack JavaScript Techdegree Graduate 21,632 PointsYou 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.