Actually XHTML is the very best thing you can use...if you use it correctly.
XHTML when served as application/xhtml+xml forces you to write strict code, any XML parsing errors and the whole page breaks (except in WebKit browsers (Safari and Chrome) as they will display a broken rendering of the page and Internet Explorer 8 and older will ask you to save the file since IE8 and older do not support XHTML correctly).
Complicated? Sure! Worth the "aggravation"? I've seen more then my share of people blowing hours if not days tracking down something as simple as a missing quote. If web designers and web developers used XHTML a missing quote in a saved web application, ALT+TAB, reload, broken page with an error message...you then know that there is an issue, have the line number, and the description of the error; that issue will be resolved in seconds, not hours.
Additionally HTML4/5 are
not extensible. HTML5 is not something I find desirable in many ways however by sticking with XHTML 1.1 I can
extend it to support (X)HTML5 features while maintaining clean and consistent code.
When doing web design and web development having error messages thrown at you left and right might sound undesirable however no one ever pulled ahead of others in life by doing what everyone else has done. You can opt to fixing errors as quickly as you find them and ensuring your work is solid and difficult for others to challenge or you can give yourself an advantage by working that much harder because in my personal experience by going that extra mile I've made my world unbelievably easier, saved countless hours of time, and spent much more of my time producing instead of troubleshooting.
In the long term if you're not doing serverside coding (e.g. PHP, ASP, CF) and can not do content negotiation then you're not going to be able to pull off XHTML correctly...however learning a language like PHP is well worth your time.
With the serverside fallback support for non-XHTML browsers the example code below will work in all browsers. If you don't know how to run a web server all you need to do is download a copy of XAMPP (it's free to download/use), adjust the htdocs setting (XAMPP\apache\conf\httpd.conf) to where you would prefer to save your web applications, and you'll be rocking in no time.
Are there cons beyond that with XHTML? Well someone might say you can't use document.write in JavaScript but you'll seriously want to avoid using that, innerHTML, or putting script elements in to the body and stick to standards. Also use an editor such as SuperEdi so when you save files (in the save as dialog window) you can remove the BOM (Byte Order Mark, proprietary Microsoft...stuff).
Not that Tedster is leading you wrong though I do think people should have the pros and cons laid out before them on equal terms. Honestly if I had come across something like this a year or two in to learning it would have easily shaved off several years of figuring this all out on my own. XHTML won't allow second-rate code though so far not only has XHTML allowed me to do everything HTML would, I'm doing things I just couldn't dream of with XHTML that HTML just isn't capable of doing. All that's left is for you to give it an honest attempt. ;)
- John
example.php For using with XAMPP web server on your computer...
<?php
if (isset($_SERVER['HTTP_ACCEPT']))
{
$mime_ua = stristr($_SERVER['HTTP_ACCEPT'],'application/xhtml+xml');
if ($mime_ua) {$mime = 'application/xhtml+xml';}
else {$mime = 'text/html';}
}
else
{
$mime = 'text/html';
}
header('content-type: '.$mime.'; charset=utf-8');
echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
if ($mime=='application/xhtml+xml') {echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'."\n";}
else if ($mime=='text/html') {echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'."\n";}
?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Example XHTML Template</title>
<meta name="description" content="Example XHTML template." />
<meta name="keywords" content="word1, word2, word3" />
<meta name="language" content="EN" />
<meta name="robots" content="INDEX, FOLLOW" />
<base href="http://localhost/example1/" />
<link href="themes/style.css" media="screen" rel="stylesheet" title="classic" type="text/css" />
<script src="scripts/index.js" type="text/javascript"></script>
<script src="scripts/onload.js" type="text/javascript"></script>
</head>
<body>
<h1>Example XHTML Template</h1>
<div>
<p>This is an example XHTML template.
  Best to test this out initially in Firefox or Opera, thirdly in Safari, and lastly in Internet Explorer.</p>
</div>
</body>
</html>
example.xhtml Will work with all browsers (Firefox, Opera, Safari) except for IE8 and older (will work in IE9)...
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Example XHTML Template</title>
<meta name="description" content="Example XHTML template." />
<meta name="keywords" content="word1, word2, word3" />
<meta name="language" content="EN" />
<meta name="robots" content="INDEX, FOLLOW" />
<base href="http://localhost/example1/" />
<link href="themes/style.css" media="screen" rel="stylesheet" title="classic" type="text/css" />
<script src="scripts/index.js" type="text/javascript"></script>
<script src="scripts/onload.js" type="text/javascript"></script>
</head>
<body>
<h1>Example XHTML Template</h1>
<div>
<p>This is an example XHTML template.
  Best to test this out initially in Firefox or Opera, thirdly in Safari, and lastly in Internet Explorer.</p>
</div>
</body>
</html>
"No one ever achieved greatness by playing it safe." - Harry Gray