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

lindsey jordan
3,143 PointsIs this quiz question incorrect? My HTML tag is AFTER the DOCTYPE tag, but the quiz errors stating the HTML tag isWrong
Here is my code: <!DOCTYPE html>newDoc<!DOCTYPE html> <html> </html>
Quiz errors saying this: Bummer: Don't put your <html> tag before the <!DOCTYPE html> tag - the doctype needs to be the first tag in your document!
My HTML tag is not before the DOCTYPE tag... what am I missing here?
<!DOCTYPE html>newCode<!DOCTYPE html>
<html>
</html>
2 Answers

lindsey jordan
3,143 PointsI removed the second <!DOCTYPE html> tag and it worked. I take it the DOCTYPE tag does not really need to be closed? Or was that just for this example?

James Anwyl
Full Stack JavaScript Techdegree Graduate 49,960 PointsHi Lindsey,
Thanks for posting your solution, it helps other students with similar issues.
You only need to declare 1 doctype, and you don't need to close it as it's a declaration and not a tag.
See Why is there no closing tag for <! DOCTYPE>?
Hope this helps :)

lindsey jordan
3,143 PointsGot it, thanks!