Is XHTML dead?

HTML-5, not XHTML, is the future of the web.

To X, or Not to X…? Just Say No to XHTML.

What a shock: All this time I thought the web was migrating toward XHTML. I updated several of my sites to XHTML 1.0 Strict, and was real proud of it—yessiree, I done lernt me all that new-fangled XHTML stuff…

Then I woke up and read this and this expert material, and found out that:

Hmmm… that makes sense. I always wondered just what I was missing—surely there’s gotta be more to XHTML that just that extra space and slash… But as it turns out, nothing at all.

“Many people prefer to use XHTML because of the advantages XML brings for editing or processing of documents. However, there is still a lack of support for XML files in mainstream browsers, so many XHTML 1.0 files are actually served using the text/html MIME type. In this case, the user agent will treat the file as HTML.” —w3.org

About the XML Prolog Problem

XHTML documents are supposed to start with this on the first line:

<?xml version="1.0" encoding="utf-8"?>

Here’s the low-down on the xml prolog (derived from w3.org):

My web sites were served like this, which (hopefully) made the server serve it as HTML with 8859-1 encoding:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/XHTML1/DTD/XHTML1-strict.dtd">
<HTML xmlns="http://www.w3.org/1999/XHTML" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Language" content="en-us" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

That worked fince, but now that I know it’s unnecessary, I’ve converted everything back to HTML4 Strict, for the reasons mentioned above. This is the one to use until HTML5 is both finalized and then well-supported:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  "http://www.w3.org/TR/HTML4/strict.dtd">
<html lang="en">
<head>
 <meta name="language" content="en">
 <meta http-equiv="Content-Language" content="en">
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

Yes, the three language directives are redundant, but using them keeps all servers and browsers happy.

Conclusions

Relevant Links:

http://www.w3.org/International/tutorials/tutorial-char-enc/

http://www.w3.org/International/articles/serving-XHTML/

http://www.webdevout.net/

http://hsivonen.iki.fi/doctype/

http://www.spartanicus.utvinternet.ie/no-xhtml.htm

— KV5R is disabled. Please help. —

Valid HTML 5 Valid CSS WCAG 1 conformance Handmade with Ultra Edit Studio Xara Xtreme