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

HTML5 Validation: "Error: Start tag body seen but an element of the same type was already open."

Stumped here. I whittled a copy of my code down to basically nothing to try and find the error but I can't see it.

<!doctype html>
<html>
  <head>
    <title>Responsive Layout Demo</title>
  </head>
  <header>
  </header>
  <body>
  </body>
</html>

When I run this through the HTML5 Validator I get this error:

Error: Start tag body seen but an element of the same type was already open. From line 8, column 3; to line 8, column 8 header>↩ <body>↩ </b

2 Answers

Hey Brendan,

I don't know if that causes the problem but the header tags should be in the body.

That was the problem - thank you!!

No problem, I'm glad I could help! :)

As Tobias pointed out, your header should be inside the body tag. Like this

<!doctype html>
<html>
  <head>
    <title>Responsive Layout Demo</title>
  </head>
  <body>
    <header>
    </header>
  </body>
</html>