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 trialToryan Reed
1,750 PointsHow do you write My first paragraph inside your body elements?
I'm having trouble with the 4th challenge task
<!DOCTYPE html>
<html></html>
<head></head>
<body></body>
</html>
<body>
<p> My first paragraph
</body>
</html>
4 Answers
Irving Amador
7,488 PointsYou are closing the html tag at the start of the file, then closing the body tag right after open it too. Then you reopened the html tag again. You can only have 1 html tag for open and for closing, 1 body tag for open and for closing, 1 head tag for open and for closing. The other kind of tags you can repeat them over and over inside the body tags
The code should look like this:
<!DOCTYPE html>
<html>
<head></head>
<body>
<p>My first paragraph!</p>
</body>
</html>
The <html></html> tags encapsulate the whole document. Between the <body></body> tags you put the other tags like the paragrapgh tag in this case.
Anna E.
2,502 PointsInside the body elements you might want to try doing this.
<body> <p> </p> </body>
In between the paragraph elements is where, when it asks if it asks, you add words to form a sentence or more.
Anna E.
2,502 PointsLol, You forgot to close it.
Here. </p>
Mirza Sisic
1,467 PointsMost tags need a closing tag, only some are self closing, like the <img> tag, for example.
Anna E.
2,502 PointsThe <p> tag isn't self closing though. To close they need </p>