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

Noelle Wayman
Noelle Wayman
665 Points

idk what to do

its saying put the head like <html><head/></html> but its not working

index.html
<!DOCTYPE html>
<html></head/></html>
<html></body?></html>

1 Answer

Laura Coronel
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Laura Coronel
Treehouse Teacher

You’re on the right track trying to include the <head> and <body> elements, but the syntax you used isn’t quite correct yet.

A few important things to remember:

  • <head> and <body> are not self-closing tags, they need both an opening and a closing tag.
  • The <head> and <body> elements must go inside one pair of <html> tags, not each in their own <html> tag.
  • The closing tags must match exactly: </head> and </body>.

Here is the correct structure the question is asking for:

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

  <body>
  </body>
</html>

Try rewriting your code using this structure. Once the tags are in the correct order, the page will work as expected.