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 Introduction to HTML and CSS (2016) HTML: The Structural Foundation of Web Pages and Applications The Basic Structure of a Web Page

About <DOCTYPE html>

Dear Friends,

Have noticed that openening <DOCTYPE html> appears like that <doctype html> Do you know we could use like <doctype html>?

Because i know that is complusury to use capital letters for DOCTYPE

Thank You,

3 Answers

Gavin Eyquem
seal-mask
.a{fill-rule:evenodd;}techdegree
Gavin Eyquem
Front End Web Development Techdegree Student 20,735 Points

Try <!doctype html> first and then try <!DOCTYPE html> second. Experiment and note down the results. I would stick with caps but if it works without then use that, if you wish.

ok, thanks :)

The specs say it is case-insensitive. https://html.spec.whatwg.org/multipage/syntax.html#syntax-doctype

There is a bit of debate on whether DOCTYPE should be uppercase for backwards compatibility, so use that if you are aiming to support legacy browsers.