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

Choosing a DOC TYPE.

When using a little of everything from HTML and html5 and CSS and css3 etc. how do you go about choosing the correct doc type?

I'm validating a site and can't seem to find a doc type the validator agrees with.

7 Answers

Alex Hedley
Alex Hedley
16,381 Points
<!dOctyPE html>
<html lang="en">
...
</html>

What validator are you using?

<!DOCTYPE html> 

W3c. So I need not be concerned with choosing transitional etc anymore?

Just use this:

<!doctype html>

If there's a problem with the validator check your markup, sorry to sound harsh but it's probably your fault. :smiley:

Use the following link to validate HTML5, not the regular W3C validator.

http://validator.w3.org/nu/

OR

http://html5.validator.nu/

Thanks. I'm just used to using the old transitional doctype etc. I understand the purpose of validating and checking the code lol.

@John - Woah I didn't know about the W3C validator that used the nu engine, awesome :smile: