DOCTYPE - HTML Tutorial with Example
The <!DOCTYPE> declaration give information to the web browser about what version of HTML is used, <!DOCTYPE> declaration is supported in all major browsers. The <!DOCTYPE> is placed in very first thing in HTML document before the HTML elements.
HTML 5 DOCTYPE
HTML 5 is not based on SGML therefore does not require a reference to a DTD.
HTML 4.01 DOCTYPE
HTML 4.01 was based on SGML and the <!DOCTYPE> declaration refers to a DTD.