Why Not XHTML 1.1 Strict?

January 25th, 2006

I was asked why not use XHTML 1.1. I personally have been using XHTML 1.0 Transitional for multiple reasons. And I have also been avoiding XHTML 1.1 for a very specific reason. In order to understand the reason you must know the history of HTML.

When HTML first gained popularity there was no clear standard that Netscape and other browser developers were following. They basically invented tags as they added browser features. When Internet Explorer ignited the Browser Wars even more tags were added and the original intent of what HTML was supposed to do became unwieldy. Web developers and designers became fed up with having to account for browser inconsistencies and demanded that the browser makers follow the standards. And due to this situation the bodies for web standards started to become more valued.

In the early days of the web the HTML specification to follow was HTML 3.2 which added many of the custom tags created by Netscape and Microsoft and defined their behavior. You might think of this as the baseline for HTML compliance.

Then more specifications were developed to tame the bloated HTML language down to a more manageable form. New concepts like Style Sheets (CSS) and Javascript would handle style and behavior while HTML would handle semantics and structure. And with each incremental specification the HTML language would be trimmed to be smaller and smaller while features were delegated to where they were best suited.

This lead to the following specifications:

HTML 4.0 - This specification includes all of HTML 3.2 and newer tags in an attempt to define the proper behavior for all of these rogue tags. This specification is more of a documentation effort and not recommended for use.

XHTML 1.0 Transitional - This specification is essentially identical to HTML 4.0 but it introduced XML compliance rules. This means every tag which opens must be closed, among other XML rules. This specification is where HTML ends and XML begins.

XHTML 1.0 Strict - This specification begins to trim many style related attributes which should now be handled by CSS.

XHTML 1.1 - Finally this specification makes the leap from HTML to XML and requires that the content type be XML instead of HTML.

So why use XHTML 1.0 Transitional now?

  • older browsers can treat it like legacy HTML
  • allows style related tags in HTML (not just CSS)
  • renders on newer browsers
  • reduces the amount of work necessary to update HTML 3.2 pages

And why not use XHTML 1.1? Basically it means you have to configure your web server to recognize these pages as XML and then require browsers to also understand it. And that is where you will run into trouble. It has not been until very recently that a couple of browsers would actually handle XML as web pages. In fact, the fresh release of ASP.NET 2.0 does not support XHTML 1.1 and the forthcoming Internet Explorer 7 will not support XHTML 1.1 as it must be served up as XML through the "application/xml+xhtml" MIME type. And since Internet Explorer commands at least 90% of public web traffic I will not choose an XHTML specification which will not work for such a large portion web visitors.

Assuming Internet Explorer is released sometime soon it may be another 18 months before we see another major release which might support XHTML 1.1. At that point ASP.NET 3.0 will also be released with the necessary support. That gives us all a good reason to hold back with the XHTML 1.0 Transitional a while longer, although it may not hurt to push into HTML 1.0 Strict in preparation for the day we can make the cut over to XHTML 1.1. For now I am not even going to bother. I can survive with the limited functionality I get from XHTML 1.0 Transitional, CSS and Javascript. After all, some are even calling it Web 2.0.

Comments are closed.