Is there a machine-readable version of HTML5 specs?

后端 未结 5 1064
日久生厌
日久生厌 2020-12-28 18:51

I\'m looking for a machine-readable version of the HTML5 specs, akin to a DTD, although any format would do as long as it\'s parsable.

The HTML5 specs don\'t seem to

5条回答
  •  不知归路
    2020-12-28 19:32

    UPDATING

    Since 2014-10-28 the HTML5 is a recommendation (!)... But this question is not obsolete (the validators now are more complex tham simple DTD).

    ANSWER

    there are no simple parser, as @ruediste clues show... Today, perhaps the best parser is at https://validator.nu/ ... so,

    1. You show the first part of the answer: it is a complex parser, and validator.nu is a good parser.
    2. the 2014-10-28 W3C's recommendation confirms that there are no simple parser (like a DTD or a list of elements) to say "this is a valid HTML5".
    3. ... this other question show that, perhaps, only context (use/community) can validate the list of tags and attributes.

提交回复
热议问题