Hi mages of coding :) Is the <!DOCTYPE HTML>-tag required to write HTML/HTML5? Thanks for your answers ;) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Hi mages of coding :) Is the <!DOCTYPE HTML>-tag required to write HTML/HTML5? Thanks for your answers ;)

Doctype required?

4th Apr 2017, 9:45 AM
EndlezzPlay
EndlezzPlay - avatar
3 Answers
+ 1
IMHO, A DOCTYPE is a required preamble. DOCTYPEs are required for legacy reasons. When omitted, browsers tend to use a different rendering mode that is incompatible with some specifications. Including the DOCTYPE in a document ensures that the browser makes a best-effort attempt. CMIIW ref : https://www.w3.org/TR/html5/syntax.html#the-doctype
4th Apr 2017, 10:20 AM
cahya dwiana sn
cahya dwiana sn - avatar
0
Using <!DOCTYPE HTML > you make browser understand you are using HTML5. In fact HTML5 has better tags over HTML
4th Apr 2017, 11:45 AM
Emanuele Di Bella
Emanuele Di Bella - avatar
0
Thanks for your answers [thumbup] :)
4th Apr 2017, 11:47 AM
EndlezzPlay
EndlezzPlay - avatar