By greimer on Aug 29, 2007
Which HTML doctype is best?
- HTML 3 or lower, or just don't use a doctype.
\*Shudder\* With an ancient or missing doctype, your web page will be rendered in quirks mode, making proper CSS design more buggy and difficult.
- HTML 4.01
My personal choice. As of 2007, HTML is still a perfectly current, valid standard, and is extremely well-supported and well-understood on the web.
- XHTML 1.0 or 1.1
There are actually some problems with XHTML. As of 2007, try to serve true XHTML, and your website will probably fail for lack of visitors, simply because Internet Explorer (IE) currently doesn't support it. Many sites these days claim to be built in XHTML, but most fail the validator, and almost all are served as text/html to support IE, causing them to be understood by all browsers as nothing more than syntactically weird-looking HTML. In other words, it is HTML in all but name. As a best case scenario, let's assume that on September 2008 IE 8 will ship with true XHTML support. That means XHTML won't be a feasible option for websites until the last users of Internet Explorer 7 (released 2006) finally upgrade. In other words, extremely optimistically, it will be, say, 2010 or later before true XHTML is a viable option. Until then, why fake it? All of that said, there are some good reasons to use today's faux brand of XHTML. Most commonly, content might need to be treated as XML on the server-side, even if it's served as text/html to the client. This is where I think XHTML shines today.