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 trialmustafa attaie
8,068 PointsDoctype Question?
ok, so i've seen some teachers in treehouse have there Doctype in all caps and all lowercase. whats more professional for the everyday workforce use?
3 Answers
Matt Ramsden
14,152 PointsSometimes it's in capitals to emphasie that it's an important part of the code. It's down to personal preference really, I always have mine in capitals as that's how I was taught years ago. But it can only be one or the other, or all caps or all lower case and not a mix
!doctype - legal !DOCTYPE - legal !Doctype - Illegal !DoctYpe - illegal
Jennifer Nordell
Treehouse TeacherSome Treehouse teachers may use all lower case. But I'd point to the Treehouse website itself as a good example. Most places use all caps for the doctype. Right click this page and view the source :)
<!DOCTYPE html>
That's what I see most often.
mustafa attaie
8,068 Pointsis there a right or wrong answer? I didn't think so, but i completely forgot to use other websites as a source! xD thank you, i'll keep that in mind for next time!
Zenon Paredes
19,204 PointsThe doctype is case-insensitive, will work wether its lowercase or uppercase, official documents use capitalized doctype so I'd use " !DOCTYPE html ". Take a look : https://www.w3.org/TR/html51/introduction.html#a-quick-introduction-to-html.