أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.
By not providing a doctype you will trigger the browser to render your HTML in something called "Quirck Mode" (at least this is the case with IE). The way it works is if you put any valid DOCTYPE declaration at all in your page the assumption is that you know what you're doing and your browser will render in a standards compliant way, and if you don't put one in it will render in the old "wrong" way. So in a webpage your doctype should match the version of HTML you are using. In other words, yes you need <!doctype html> at the very beginning of your HTML document if you are planning to use HTML5.
I hope this answers your question.
Happy coding :)