I was wondering this. Why not HTML 4.x or even 5?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
What really should I be using instead, if any?
I believe we all agree why HTML5 wasn’t chosen as the default standard for web pages in Visual Studio 2010. With the release of the 2010 version, HTML5 wasn’t even supported, and only some features were implemented in SP1.
So the question is why chose XHTML over HTML 4.01 (and then why chose different versions of XHTML over others).
First of all, this is an excerpt from a MSDN article regarding XHTML support ( http://msdn.microsoft.com/en-us/library/exc57y7e(v=vs.100).aspx ):
Now, how do you choose between different versions of XHTML (1.0 Transitional, 1.0 Strict and 1.1)?
The main difference between XHTML 1.0 Transitional and Strict is the shift towards more semantic markup (inclusion only of structural elements, and not styling elements, like <font> or <pre>). Transitional still supports these elements and attributes (like <img> width and height) because it is designed for backwards-compatibility (hence the name Transitional) while Strict doesn’t, and encourages the use of CSS instead of markup.
So, the idea here is that you use Strict when you have understood that you need to separate style (CSS) from markup (HTML).
But why not chose XHTML 1.1 (also supported by VS 2010) instead of XHTML 1.0 Strict? Aside from some minor tweaks (removal of the "name" attribute for <a> and <map>, the removal of the "lang" attribute in favor of "xml:lang" and the addition of the ruby element) there are no major differences when it comes to specific markup. The major downside of XHTML 1.1 is that it requires you to transmit your content as "application/xhtml+xml" instead of "text/html", and the browser support for this was limited with earlier versions.
So, why did Microsoft decide to use XHTML 1.0 Transitional as their default DOCTYPE?
I mentioned only Visual Studio, but same applies to Expression.