Search code examples
htmlmarkupspecifications

How to know the type of HTML5 specification used?


I am currently reading about HTML5 and it was mentioned that there are two specifications available for developer:

  1. W3C HTML5 Specifications
  2. WHATWG HTML5 Living Standard

My question is, is there is an way to distinguish a website developed by the first type from those developed by the second one? What's the difference between the two types?


Solution

  • There is no standard way to distinguish which specification(s) the author followed.

    Since HTML5, the DOCTYPE no longer contains a version indicator. See W3C’s HTML WG decision from 2010.

    You could of course try to find if the author used something which is allowed in only one of the specifications, but even then, it could be the case that the author used things from both specifications, or copy-pasted a snippet, or followed a draft, or didn’t use a specification to begin with.

    A good example is the hgroup element. It’s part of WHATWG’s HTML, but it’s not part of W3C’s HTML5 REC or HTML 5.1 REC. However, it was part of earlier W3C HTML5 drafts. So if you find a document that contains a hgroup element, it could be the case that the author used WHATWG’s HTML, but it could also be the case that the author used a W3C HTML5 draft.