This forum is now read-only. Please use our new forums at

HTML Basics Forum

View Course » View Exercise

127 points
Submitted by
over 4 years ago

<!DOCTYPE html> what the capital letters?

I'm curious as to why the word doctype is capitalized or needs to be capitalized in the <!DOCTYPE html> tag?

Will the tag not work properly if it is written in lower case letter?

4 votes


I think it is capitalized to emphasize that this line is the doctype and that this line is very important.
However, the doctype is case-insensitive, so you could write it in lowercase, if you wanted to.
But I suggest doing it the way it is taught here at CC, as the official documents use the capitalized doctype.
=> You can write it the way you want, but I recommend writing it in uppercase letters.
I hope it helps. :-)

3108 points
Submitted by
over 4 years ago


49114e24b595c478aa28ae0e40274446?s=140&d=retro Samuel Lim over 4 years ago

I think the computer only recognises capital letters, But it confirm works if you use capitals, so just use it.

519d1c15be660a76be00022c_64613546 Francis Pang about 4 years ago

@Samuel: i think that a normal browser will render a doctype in lowercase in HTML file, but it will not do so in XHTML.

3 votes


Just thought I would share some extra info that I read. Apparently if you are coding in any xml serializations such as XHTML, then the DOCTYPE has to be capitalized otherwise it will throw a syntax error. I read this on a forum somewhere so don't know if there is any truth to it, but if anyone knowledgeable in this area can shed any light on this, it would be much appreciated :)

610 points
Submitted by
Richard Walker
over 4 years ago

1 Comment

5154c6cf115b457ac9000021_667301409 boring12345 over 4 years ago

Perhaps try it:

0 votes


DOCTYPE, along with most other html elements, does not care about case. This is for emphasis.

1210 points
Submitted by
over 2 years ago

0 votes


As I know, it's for emphasize.

388 points
Submitted by
over 2 years ago