W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2011

[whatwg] DOCTYPE declaration

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Sun, 16 Oct 2011 10:34:53 -0700
Message-ID: <CAAWBYDAOp2tojLcZniG6L_c66gEFCVHhbJpA0jYEv-Xt7+vNww@mail.gmail.com>
On Sun, Oct 16, 2011 at 10:30 AM, Francis Boumphrey
<boumphreyfr at gmail.com> wrote:
> I'm not sure if this is the right place to ask this.
> What, if any DOCTYPE declaration should be used on HTML5 documents. As these
> usually refer to a DTD, and living HTML does not have a DTD is it even
> appropriate to use one?

You use the "<!DOCTYPE HTML>" doctype, as explained in the spec.

Doctypes in HTML have never, in practice, actually done anything
useful.  The DTD reference hasn't been followed by any major browser
(the W3C website has had to go to great lengths to protect itself from
being DDOSed by the few editors and niche browsers that *do* follow
DTD references), and essentially acts solely as a talisman that
switches between Quirks Mode and Standards Mode.  "<!DOCTYPE HTML>" is
the minimal string that still triggers Standards Mode in every major

Received on Sunday, 16 October 2011 10:34:53 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:37 UTC