The Full HTML5.2 DTD, like former versions, is a transcription of WHATWG's HTML specification prose into an SGML DTD. If follows WHATWG snapshots as published by W3C (WHATWG itself doesn't publish stable snapshots of its specifications). The Full DTD covers all elements of HTML, SVG, MathML, and the ARIA attributes, and its construction is described in the reference for the W3C HTML 5 DTD, with only modifications for version 5.2 descibed in this document.
The Minimal HTML5.2 DTD,
also like former versions, is a compact DTD containing
only essential parsing rules for HTML.
As only HTML's special rules for HTML void elements and
enumerated attributes are included (others being admitted
freely), the Minimal HTML5.2's DTD
usefulness for validation purposes is limited. Instead, the
purpose of the Minimal HTML5.2 DTD is to provide a
minimal bundled declaration set for content parsing and
production tasks for modern and idiomatic HTML in sgmljs.net
and other SGML software with support for resolving
declaration sets via catalog resolution (in sgmljs.net,
the Minimal HTML5.2 DTD is resolved and accessed by
about:legacy-compat system identifier).
According to the W3C HTML 5.2 recommendation text
At time of publication of this document, patches from the WHATWG HTML specification have been merged until January 12, 2016
The W3C HTML editors have also added patches that resulted from discussions and decisions made by the W3C Web Platform WG as well a bug fixes from bugs not shared by the WHATWG.
(for example, the revised content models for
as child element introduced into WHATWG with
The W3C HTML5.2 recommendation documents their changes versus prior versions in Changes. The following subsections describe particular changes.
This W3C HTML 5.2 DTD reflects changes made to W3C's latest
HTML recommendation. For the Minimal DTD variant,
element declarations for all elements that can be
nested are added to block
IMPLYDEF ELEMENT ANYOTHER
inferring an end-element if a nested element occurs.
This W3C HTML incorporates an SVG DTD derived from
the official SVG 1.1 2nd edition DTD, updated with support
vector-effect attribute with its only permitted value
non-scaling-stroke from SVG 1.2 using the SVG 1.1 2nd
editions extensive customization features. This is in line
with the W3C HTML 5.2 HTML specification text stating that
[...] the SVG specifications do not reflect implementation reality. Implementations implement subsets of SVG 1.1 and SVG Tiny 1.2. Although it is hoped that the in-progress SVG 2 specification is a more realistic target for implementations, until that specification is ready, user agents that implement SVG must do so with the following willful violations and additions. [...]
The Minimal DTD for HTML 5.2 now also contains
declaration for SVG elements (but not attributes) to
block SGML's interpretation of undeclared elements
IMPLYDEf ELEMENT ANYOTHER semantics (which would
make SGML auto-close undeclared element such as SVG's
g element when encountering a nested
keygen element has been removed from the
HTML 5.2 version. Note that, unlike other removed
keygen element is an SGML element
with declared content
EMPTY (a HTML void element),
hence shouldn't be used with an end-element tag.
The presence of elements with special parsing
rules, however, requires a declaration for thse,
keygen element is not removed from
the Minimal HTML 5.2 DTD.
menuitem elements are removed,
and this is reflected in updated content models
and element-category parameter entities throughout.
, like thekeygen
been incorporated as a legacy element with declared
contentEMPTY` into the Minimal DTD.
dialog element has been added.
As reflected by changed DTD code text
contextmenu global attribute and the
oncontextmenu event handler attribute have been
dropzone global element has been
oncut event handler attributes
have been removed
onloadend event handler attributes have
Global attributes are declared via a parameter entity reference now that the specification text no longer specifies these individually on every element.
The window or body event handler attributes, used to be specified separately in previous specifications, are now specified along with the body element. The following window event handler attributes are added:
The updated grammar rules admit
as child content of
dl elements (and seems to allow
dt content tokens into child
elements, similar to "transparent content"), when in
older HTML grammar rules the content model of
could be seen to infer/force
dt elements. But actually,
dd require start-element tags in both
W3C HTML 5.1 and 5.2, so no inference opportunity is lost.
The schema change has a related change to the
div element which is now required to
dt, dd pairs when the
div element itself
appears as direct child content of a
element. This is, however, not completely reflected
in the updated HTML 5.2 DTD; the 'div
anddl` elements anywhere in addition
to flow elements (via a content model inclusion).
legend element now admits
as child element.
colgroup element admits start- and end-tag omission
under specific conditions; this is reflected in the
HTML 5.2 DTD's tag omission indicator for the colgroup
referrerpolicy attribute has been added to the
longdesc attribute has been added to the
allowpaymentrequest attribute has been added to
media attributes have been
added to the
The new value
dialog has been added to the
autocomplete attribute has been added to the
inputmode attribute has been added to the
The declaration of
footer elements as
given in previous DTD transcriptions for W3C HTML 5
and 5.1 didn't admit nested
respectively, when are allowed by the specification text, eg.
... with no [...] header, footer elements that are not descendants of sectioning content wich is a descendant of the header [or footer, resp.]
says saying that child
are only allowed within the child content of
footer relements, resp., when these are in turn part of a
child sectioning root (ie. not directly as child).
This can't be represented by exclusion exceptions, but must be declared by stating all directly admittted child elements (flow elements without header and footer elements) directly in a content model.