jeudi 5 février 2015

Is Doctype is needed for HTML5 documents


Recently I had a job interview and one of the questions was 'Is doctype needed for html 5 documents'. I`ve answered 'no' but have a feeling that I might be wrong. From the w3 it looks like it is absolutely required but if I type a simple html like



<html>
<body>
<input type="color" disabled/>
</body>
</html>


save it as html and try to open in Chrome - it would work perfectly well, with a new color input (disabled). That input is html5 as well as attribute.


So the question is - do I need to specify doctype or not? What would be the correct answer for the interview?





Aucun commentaire:

Enregistrer un commentaire