Previous discussions
Commit in which the change was made: 7a2f9dc
Relevant issues: #335, #1059.
Specification, browsers and validators
From WHATWG
A DOCTYPE must consist of the following components, in this order:
- A string that is an ASCII → case-insensitive ← match for the string "<!DOCTYPE".
- One or more space characters.
- A string that is an ASCII → case-insensitive ← match for the string "html".
- Optionally, a DOCTYPE legacy string or an obsolete permitted DOCTYPE string (defined below).
- Zero or more space characters.
- A U+003E GREATER-THAN SIGN character (>).
In other words, , case-insensitively.
So, according to the specification, the case doesn't matter. Also, browsers (AFAIK) don't really care, and the W3C validator is fine with either case.
Pros and cons for using <!doctype html>
Pros:
Cons:
- some IDEs/text editors complain about the syntax (IMHO this shouldn't be a concern for H5BP, as it represents a bug in the IDE/text editor, and thus, it should be fixed by them. Going on this path, one can argue that we shouldn't use CSS3 features because some IDEs/text editors complain about the new syntax).
- the uppercase form is more commonly used, and thus, it doesn't make developers wonder/curious.
Thoughts?
Previous discussions
Commit in which the change was made: 7a2f9dc
Relevant issues: #335, #1059.
Specification, browsers and validators
From WHATWG
So, according to the specification, the case doesn't matter. Also, browsers (AFAIK) don't really care, and the W3C validator is fine with either case.
Pros and cons for using
<!doctype html>Pros:
htmlin thedoctypedeclaration, or anything else for that matter)Cons:
Thoughts?