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 How to Make a Website HTML First Use HTML Elements

I can't figure out what I am doing wrong with adding the head and body elements to the page..help please :)

I can't figure out what I am doing wrong with adding the head and body elements to the page..help please :). I have done it like this:

<head></head> 
<body></body>
Stone Preston
Stone Preston
42,016 Points

in order for code to show up in the forum, you must format it using markdown. i formatted it for you so it will show up. See this post or watch the tips for asking questions video to see how to format code in the forum

2 Answers

Stone Preston
Stone Preston
42,016 Points

make sure you are placing those tags within the html tags like so:

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

your head and body tags look correct, so you are probably putting them in the wrong place

Thanks! That's definitely where I was going wrong.

Stone Preston
Stone Preston
42,016 Points

glad you figured it out : ) remember that since the html tags are the root, everything else (except the doc type) goes inside those tags

what code are you using?