HTML Templates
HTML 4.01 Transitional
This is what I am currently (9/2009) recommending. I had been using the strict template, but this one is more forgiving for when you want to start implementing HTML 5 elements as they become supported. (Are there any yet? Maybe if you count stuff in the HTML 5 spec that was deprecated in HTML 4, like the <menu> tag.)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Title</title>
</head>
<body>
</body>
</html>
If you do not fully understand character sets, please leave out the meta tag in the head above. Modern browsers are very good at guessing the correct character set. In fact, they will often go with their guess and completely ignore what you put there. If this does not deter you and you want to grok character sets anyhow, I would recommend Joel Spolsky's article. (Dive Into Python 3 has some good info too.)
XHTML 1.0 Strict
This was supposed to be the future of the Web. It didn't work out that way and I am OK with that. I do appreciate that they standardized lower case for element names and attributes in double-quotes, but the spec was full of needless formalities, IMO.
<!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-Type" content="text/html; charset=utf-8" />
<title>Title</title>
</head>
<body>
</body>
</html>
HTML 5
Now this is more like it. Notice the distinct lack of cruft? And we can all starting using this once a significant majority of people are using Web browsers that implement it. Maybe our grandkids will enjoy it ...
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>
