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
Brendan Whiting
Front End Web Development Techdegree Graduate 84,738 PointsHTML5 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
Tobias Helmrich
31,604 PointsHey Brendan,
I don't know if that causes the problem but the header tags should be in the body.
David Abel
5,199 PointsAs 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>
Brendan Whiting
Front End Web Development Techdegree Graduate 84,738 PointsBrendan Whiting
Front End Web Development Techdegree Graduate 84,738 PointsThat was the problem - thank you!!
Tobias Helmrich
31,604 PointsTobias Helmrich
31,604 PointsNo problem, I'm glad I could help! :)