+ 1
If I do not put <! DOCTYPE html> will HTML 5 work?
2 Answers
+ 4
It will work, but probably not at all as you expect: without !doctype, browsers enter in a special "quirks" mode, where all is done to get compatibility even with very old versions of html and bugged versions of some browsers... this will globaly let the browser display most of page informations, but layout will probably be broken (since you've not design an Html page with old basics tags only)
+ 3
The declaration must be the very first thing in your HTML document, before the tag.
The declaration is not an HTML tag; it is an instruction to the web browser about what version of HTML the page is written in.
A lot of IDE's allow users to leave this out and simply default to a certain HTML style, but leaving it out does pose a potential threat in browser compatibility and the use of older versions of HTML.
for more details visit this link
https://www.w3.org/TR/html5/syntax.html#the-doctype