HTML5 is not based on SGML, so you don’t need to reference DTDS, but you need docTypes to regulate browser behavior (to make browsers behave the way they should);

HTML4.01 is based on SGML, so you need to reference a DTD to tell the browser what type of document the document is using.