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 trial

HTML Treehouse Club: HTML Publish a Story HTML Structure

Mike Hernandez
Mike Hernandez
2,330 Points

adding the <p> tag between the <body> and the </body>

I dont quite understand how to do this?

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

2 Answers

Carrie MacDonald
Carrie MacDonald
16,157 Points

Hi Mike,

It looks like you have some extra <head></head> and <body></body> tags in your markup.

You could wrap your text in the <p></p> tag like this:

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

Note: I removed the quotes around the text: My first paragraph, but you could leave the quotes in, if you would like the quotes to display around the text in the browser window.

For reference, here's your original code (with the duplicate elements pointed out via HTML comments:

<!DOCTYPE html> <html> <head></head> <body></body> </html> <head> <!-- Duplicate opening head tag --> </head> <!-- Duplicate closing head tag --> <body> <!-- Duplicate opening body tag --> "My first paragraph!" </body> <!-- Duplicate closing body tag -->

Ben Reynolds
Ben Reynolds
35,170 Points

It looks like you have an extra set of head and body tags after the closing html tag. Go ahead and delete those, and nest your paragraph inside the original body tag.