Why are HTML5 and XHTML 2 separate standards?

2019-01-14 22:27发布

问题:

Is there a reason why these two standards are being developed separately? They seem to be solving the same problem but what are the differences and, if they are to remain separate, what roles are they expected to take in web development in the future?

回答1:

Browser vendors care a great deal about backwards compatibility. The group speccing XHTML2 didn’t.

Note that XHTML2 isn’t solving all the same problems HTML5 is solving. HTML5 is much broader in scope than XHTML2. HTML5 covers processing models, JavaScript APIs, video, audio, application widgets, etc. but XHTML2 does not.

As for expected roles, representatives from top browser vendors participate in the HTML WG but not in the XHTML2 WG. On the other hand, people showing interest in the “Backplane” are participating in the XHTML2 WG.

See also David Baron’s post about how the W3C works.



回答2:

This article only answers part of the question. It doesn't explain what the likely roles of the two standards will be in the future.:

X/HTML 5 Versus XHTML 2

As for the likely roles, people are saying that:

  • W3C started work on XHTML 2, throwing away backward-compatibility
  • Some people didn't like that, and started to define HTML 5
  • Eventually, W3C were persuaded to adopt HTML 5 as well
  • Browser vendors seem to be behind HTML 5 (but not XHTML 2)

If browser vendors don't support XHTML 2 then I don't know what its role is. On the other hand XHTML 2 can be more-or-less converted to XHTML 1, e.g. using an XSL transformation, so it seems to me that it would be (much) easier for anyone to support, if they wanted to, than HTML 5 will be.



回答3:

XHTML2 is dead.

Have a look at the first chapter of HTML5 FOR WEB DESIGNERS by Jeremy Keith which explains superbly the differences in a summarized way.



回答4:

This is largely an accurate explanation, IMO, but it should be noted that HTML5 isn't backwards compatible - new elements like section cannot be styled with CSS in even IE7. Yes, there are JavaScript work-arounds but these aren't sufficient, both because not everyone has JavaScript enabled, far from every developer will become aware of these, and similarly not every developer has the ability to use JavaScript in this way.



回答5:

HTML 5 has been constructed with backwards compatibility in mind, unlike XHTML 2, which was created in order to break away from restrictions involved with backwards compatibility.

The W3C allowed the XHTML 2 working group to expire, essentially ending development of XHTML 2. HTML 5, with backwards compatibility and new features, will become the doctype of the future.