When you have a question about html you should always go to www.w3.org, the World Wide Web Consortium (W3C) is an international community where member organizations, a full-time staff, and the public work together to develop Web standards.
Now back to the DOCTYPE question I am trying to answer. The very beginning of an html document must start with a declaration that makes sure the document will be parsed the same way by different browsers. For html 5 the declaration is:
It MUST be entered exactly as shown above.
There are several DOCTYPES and W3C lists and explains all of them.