HTML5 DOCTYPE and Character Encoding
As part of my 2009 TODO list, I made a promise to learn more about HTML5 this year. As I'm currently rebuilding my personal site, I thought why not take some extra time and see if I can use HTML5 just now. It's my personal site, it's there for experimentation!
The first thing I've learned, not surprisingly as it's the first thing we come to in the code, is the new DOCTYPE and method of character encoding. Here is the difference:
Current XHTML 1.0 Strict DOCTYPE and Character 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-Type" content="text/html; charset=utf-8" />
</head>
New HTML 5 DOCTYPE and Character Encoding
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
Quite a difference in terms of how much less code needs written which, as someone who writes his own code....is a good thing!
I look forward to continuing my explorations of HTML 5 and will post up my discoveries as I make them.

