The differences between DHTML, HTML, and XHTML (and why XHTML is essentially dead)

Bookmark and Share

DHTML is a hype term that was a major buzz word many years ago. It stands for Dynamic HTML. It's not a web standard or language. It's not a single technology but a term for the combination of technologies HTML, DOM, CSS and JavaScript. Nothing more need be said about DHTML.

HTML and XHTML are markup languages. A markup language is a set of characters that defines a document's structure and sometimes its appearance. HTML was originally intended to define a document's data regardless of its appearance, but HTML gradually evolved to include definitions for how elements dislayed. The HTML 4 specification aimed to remove tags associated with layout, such as the <font> and <center> tags.

XHTML also aimed to exclude presentation tags from its markup. It is a form of HTML that is also XML (Extensible Markup Language). As such, it requires compliance with XML standards, meaning that all tags must be closed, tags must be properly nested, case matters, attributes must be in quotations, etc. For example, tags such as <br> are valid in HTML but must be closed as <br/> in XHTML.

When XHTML was released in 1997, it was considered the future of HTML. This is no longer the case. In 2007, the W3C decided to let the XHTML 2 Working Group's charter expired in 2009 [1].

The intent of XHTML was to improve upon and add order to HTML. By enforcing more strict coding standards, the data in a web page could be more easily read by user agents other than web browsers, and the documents would be more easy to maintain. [2, 3, 4]

XHTML was great in theory, but even though the XHTML 2 specification was released in 2002, it did not enter wide use. The failure of XHTML 2 to be implemented is widely attributed to its lack of backward compatibility with HTML 4 and XHTML 1. An example of its incompatibility is that it invalidated the widely-used <img> tag. Another reason that has been attributed to its failure is its "draconian error handling". As with XML, in XHTML 2, if a document is not well-formed the document fails to render. For a web page, this means that users would not see anything if the XHTML had even a single error. (A site could get around this restriction in XHTML 1.0 by serving the page with the text/html MIME type rather than the technically correct application/xhtml+xml MIME type. In HTML 2, this work around could not be used.) With the majority of websites containing validation errors, this posed a concern to browser developers. [5, 6, 7]

Though it's no longered considered the future of HTML, XHTML is not completely gone for those who insist on using it. As stated on, "The HTML 5 specification includes a section on XML serialization." This is referred to as XHTML 5.

HTML 5 addresses many of the issues XHTML sought to address but does away with some of its stricter requirements, such as the need for <br/> rather than <br>. In HTML 5, both versions of the tag are valid. HTML 5 also handles errors gracefully. For example, if a closing tag is missing or elements are nested improperly, the browser will still attempt to render the page rather than display nothing as the XHTML specification requires.

With the failure of XHTML, the resources that were previously occupied with the XHTML 2 specification are now freed to develop HTML. This hopefully means that we won't have to wait another 10 plus years for the next version of HTML and the features developers seek from it.


[1] 2012 -
[2] (out of date)
[3] (out of date)
[4] 2002 -
[5] 2009 -
[6] 2009 -

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.