Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
I'm practicing coding in HTML. I keep getting an error message. What am I doing wrong?
Practicing, I don't see where my error is. Any help?
<!-- This is for practice in coding. I am a creator> <!DOCTYPE html> <html> <head> </head> <body> <p>My first paragraph!</p> </body> </html>
Doc Brown1,793 Points
The problem you're having is due to the comment you have on line 1. You haven't 'ended' the comment, so it's commenting out your entire code.
Your comment should end with a -->, like so:
<!-- This is for practice in coding. I am a creator --> <!DOCTYPE html> <html> <head> </head> <body> <p>My first paragraph!</p> </body> </html>
Rebecca Turner7,409 Points
One way to help remember is to open and close the comment before putting the actual comment in- that way your bases are covered. :) <!-- -->
Zakk George4,550 Points
It could be throwing up an error because of the commented out code in the top of the page.
The correct format for commenting in html is:
Always make sure you have all the dashes you need to close the comment, otherwise it will comment out your entire document.