[ANSWER] Is “DOCTYPE html” enough for valid HTML?

Question

HTML5 Logo 512Is ‘<!DOCTYPE html>‘ enough to make your HTML valid?

Answer

Yes –  ‘<!DOCTYPE html>’ is the doctype for HTML5.

Unlike previous versions of HTML there is no longer the need to specify a DTD, in fact there is not a DTD available.

Interestingly this has also removed the emphasis of specifying which version of html the document is written in. The emphasis should now be on which html features the browser supports, rather than which version of html. With this move HTML5 should be the final version, with new features being added in the future.

Was this article helpful?

Related Articles