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.
Toryan Reed1,750 Points
How 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>
Irving Amador7,488 Points
You 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.
Inside 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.
Lol, You forgot to close it.
Mirza Sisic1,467 Points
Most tags need a closing tag, only some are self closing, like the <img> tag, for example.