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

Ylan ARFI
Ylan ARFI
986 Points

HTML Syntax error

I got an error but my code is correct... I don't understand what's happening?

Thanks, Ylan

index.html
<!-- This is a new HTML file -->
<!DOCTYPE html>
<html>
</html>

3 Answers

Nicholas Mercer
Nicholas Mercer
2,319 Points

I'd give it another shot as your code is correct and I've just tested successfully on my end:
http://imgur.com/a/82Qco

-Nick

Ylan ARFI
Ylan ARFI
986 Points

Hey Thank you Nicholas :))

Honestly, I know that my code is correct lol I just got an error even if I code my entire HTML page properly.

Here is the error I got :

"Bummer! Don't put your <html> tag before the <!DOCTYPE html> tag - the doctype needs to be the first tag in your document!"

Which is not true... I properly placed the doctype before my html balise. So I was wondering if got this issue? I want to pass this course and complete everything :)

Thanks, Ylan

Post you html comment after doctype it may resolve

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

Hi there! Your code isn't wrong, but the comment is causing the challenge to fail on step 2. Oddly enough, it doesn't cause step 1 to fail. Code challenges can be very strict and it's always best to try not to do anything they haven't explicitly asked for. Simply remove the comment and continue the code challenge.

Happy coding! :sparkles:

Ylan ARFI
Ylan ARFI
986 Points

Thank to all of you :))

tbh, I just redid it as is and it's working now... I don't understand what happened xD

Anyways, I'm ready to back at it !!!

C u around guys ^.^