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

HTML won't Validate

Hello all! When I attempt to validate my HTML document, I get the following errors, and I have no idea of what the errors mean; can someone please help me?

ERRORS: Error: Stray end tag head. From line 7, column 3; to line 7, column 9 p"></a>↩ </head>↩↩↩ ↩

Error: Start tag body seen but an element of the same type was already open. From line 11, column 3; to line 11, column 8

d>↩↩↩ ↩ <body>↩ <

MY CODE:

<!DOCTYPE html>↩ <html lang="en">↩ ↩ <head>↩ <title>Experience VR</title>↩ <a id="top"></a>↩ </head>↩ ↩ ↩ ↩ <body>↩ <div>↩

2 Answers

Zack Lee
PLUS
Zack Lee
Courses Plus Student 17,662 Points

you can't up an <a> tag in your <head> the head is reserved for metadata and recourses.

Zack Lee
Zack Lee
Courses Plus Student 17,662 Points

also please note you can format your code by surrounding it in 3 back ticks (```). you can even specify the format by specifying the language after the opening ticks e.g. ```html, ```css, ```javascript, etc.

Manjila Nakarmi
Manjila Nakarmi
7,449 Points

its best if you post the whole code than the portion like that. it is kind of confusing that way.