+ 1

declaration

is it compulsory to write <!DOCTYPE HTML>

30th Jun 2017, 2:36 PM
Abhishek Regmi
Abhishek Regmi - avatar
3 Respostas
+ 4
um no but it tells the browser that ur using html5 The most significant use of DOCTYPE is to switch a browser between Quirks Mode and Standards Mode rendering. read more here https://cheeze.club/8fnj
30th Jun 2017, 2:40 PM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
+ 2
As cheeze mentioned, it's good for the browser end. Also, if you use a decent IDE to write your code, they often look at that so it knows what type of errors to feed back to you. For example, that signifies HTML5, so then your IDE can let you know which things no longer work with HTML5, for example.
30th Jun 2017, 2:41 PM
AgentSmith
+ 1
It's not compulsory but it is recommended, it helps when coding, as your code editor might recognize some possible erros.
30th Jun 2017, 2:47 PM
Higor Vieira
Higor Vieira - avatar