Share this article

The W3C has announced that XHTML 2 will be dropped when the Working Group’s charter expires on 31 December 2009. The first W3C XHTML 2 draft specification appeared in 2002 and it was last updated in 2006. The project was an ambitious re-working of the language of the web. It sought to address the inconsistencies, banish obvious presentational tags, and implement clear and concise mark-up. Some concepts were excellent, e.g.
  • Any tag could be made a link by assigning an href attribute (<a> was retained, but would have become redundant).
  • Nested <section> tags controlled the document structure and hierarchy. A single <h> tag could denote headings at any level — the author would not need to manually manage <h1><h6> tags.
  • A new <nl> navigational list tag was introduced.
  • RDFa allowed semantics to be annotated in the mark-up.
  • The language was modularized so extensions could be added.
Several XHTML 2 recommendations have have been ported to the HTML 5 specification. Unfortunately, XHTML 2 was possibly too revolutionary. It was too different, too strict, offered little backward-compatibility, and was criticized for not supporting real-world coding practices. The specification was never completed (few are) and no major browser vendor made a serious attempt to implement the standard (IE still does not support any flavor of XHTML served as XML). How will this announcement affect XHTML developers? It won’t — not unless you have been developing XHTML 2 solutions in the faint hope of eventual browser support. XHTML 1.0 and 1.1 are still an implemented standard in most browsers and XHTML 5 will support the strict syntax, lowercase tags, and trailing slashes you want to use. The death of XHTML 2 has one major benefit: additional resources can be allocated to HTML 5. Browser vendors and developers can now work toward a single unified specification. We hope. See also:

Frequently Asked Questions about XHTML 2.0

Why was XHTML 2.0 abandoned?

XHTML 2.0 was abandoned primarily because it was not backward compatible with its predecessor, XHTML 1.0. This meant that web developers would have to rewrite their entire codebase to adopt the new standard, which was a significant deterrent. Additionally, the rise of HTML5, which offered similar features but with backward compatibility, made XHTML 2.0 less appealing to the web development community.

What are the main differences between XHTML and HTML?

XHTML is a stricter and cleaner version of HTML. It requires that all tags be properly closed, nested correctly, and be in lowercase. HTML, on the other hand, is more forgiving and allows tags to be improperly closed and nested. XHTML also requires that all attribute values be quoted, while HTML does not.

What was the purpose of XHTML 2.0?

XHTML 2.0 was designed to be a general-purpose markup language that could be used for a wide range of applications. It aimed to improve upon XHTML 1.0 by introducing new features like better form handling, improved accessibility, and the ability to embed other XML languages.

What are the advantages of using XHTML?

XHTML offers several advantages over traditional HTML. It is more strict, which can lead to cleaner and more consistent code. It also supports namespaces, allowing you to mix different XML languages in your documents. Additionally, because it is XML-based, it can be parsed with an XML parser, making it easier to manipulate and extract data.

Why is XHTML not widely used today?

XHTML is not widely used today primarily because of the rise of HTML5. HTML5 offers many of the same features as XHTML but is more flexible and easier to use. Additionally, HTML5 is backward compatible with older versions of HTML, making it a more attractive option for web developers.

What is the future of XHTML?

The future of XHTML is uncertain. While it is still used in some applications, its popularity has declined significantly with the rise of HTML5. However, it is still a viable option for certain use cases, particularly those that require strict syntax and the ability to mix different XML languages.

Can I still use XHTML for my website?

Yes, you can still use XHTML for your website. However, you should be aware that it may not be as widely supported as HTML5, and you may encounter compatibility issues with some browsers.

What are some resources for learning XHTML?

There are many online resources for learning XHTML, including tutorials, documentation, and forums. Some popular options include the W3Schools XHTML tutorial, the Mozilla Developer Network XHTML guide, and the SitePoint XHTML forum.

How does XHTML compare to other markup languages?

XHTML is similar to other markup languages in that it uses tags to structure content. However, it is stricter than most, requiring that all tags be properly closed and nested. It also supports namespaces, which allows for the mixing of different XML languages.

What are some common mistakes when using XHTML?

Some common mistakes when using XHTML include not properly closing tags, not nesting tags correctly, and not quoting attribute values. These mistakes can lead to errors and inconsistencies in your code.

Craig BucklerCraig Buckler
View Author

Craig is a freelance UK web consultant who built his first page for IE2.0 in 1995. Since that time he's been advocating standards, accessibility, and best-practice HTML5 techniques. He's created enterprise specifications, websites and online applications for companies and organisations including the UK Parliament, the European Parliament, the Department of Energy & Climate Change, Microsoft, and more. He's written more than 1,000 articles for SitePoint and you can find him @craigbuckler.

Share this article
Read Next
Get the freshest news and resources for developers, designers and digital creators in your inbox each week