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

Is my DOCTYPE not working?

Hello guys!

Just starting out with the web dev track. Having fun but for a little possible problem. It doesn't look like my <!DOCTYPE HTML> is recognised like in the video or in other examples i've seen.

Mine displays as white text, and all the html tags etc after it display as red.

is this wrong? Sorry for the newbie question

Ross

4 Answers

What text editor are you using Ross? If your using sublime text 2 its perfectly normal for the doctype to display as white text. I assume its the same for all other text editors as well.

As Kevin says it depends on your editor why you may see this error. I use Sublime and would see this if my file that has the doctype has not been saved yet, thus sublime does not know the file type and which is the correct syntax highlighting.

Totally normal. Mine does that as well. It also depends on what color scheme you're using as well. I have the Soda-Dark theme.

Thanks all. Newbie mistake, just disconcerting that all the other text was red. But i'm blitzing through the early tutorials and all seems fine!

Thanks again Ross