HTML5 Doc type | Sololearn: Learn to code for FREE!


HTML5 Doc type

Is there a reason for making this `<!DOCTYPE HTML> ` uppercase because I've seen a lot of people use lowercase in their source code and it works fine.

7/26/2019 11:12:50 AM


10 Answers

New Answer


Both are valid 👍


HTML is case insensitive, so writing <!DOCTYPE HTML> in uppercase or lowercase doesn't affect your web page. It will work same.


It's the same


It's the same because HTML was created case insensitive, and they've always wanted to change it, but never have from what I've heard so they could standardize it. Usually though, tags are lowercase, and DOCTYPE is uppercase.


If your using vscode, (not sure if it works on other text editors), and struggling to remember the layout for HTML. Do this on an empty HTML file: ! Then tab button And marvel at the magic of vscode! It doesn't specifically answer your question, but is useful. I would recommend learning the layout though, practice, practice, practice.



It is just a matter of follow an arbitrary standard doesn't make a difference in the overall output


yes in upper case or lower cAse the output will be same


Html is a case sensitive,so we can use upper or lower cases. their is no effect in the output .


Upper or lower Both are valid