To kick off any redesign, you must first define your XHTML document. So before you do anything you must remember to use a DOCTYPE:
There’s also a frameset one, but it’s for when you want to use frames. Since it’s not recommended that you use frames, I left it out here. Choosing between strict and transitional is actually not as easy as it seems. Sure strict is the “official” way XHTML should be defined. However, the very useful target attribute (to open a new window) is depreciated in the strict form of XHTML. I know that people hate popups, but people also hate losing their place when clicking on a link which takes them to a new site. I will use strict, though, just because I like to follow the rules.
First off, it’s specifically defined in the specification the root document must define a namespace. More specifically the XHTML namespace which we are using. Secondly, according to the XHTML 1.0 specification we should use both the
xml:lang attributes. I have not read much about this topic, but I can see the usefulness. The useful part of course being the international support.
After the title, I separated the meta tags into two parts:
The first part being the important to the document and search engine optimization, respectively. The second part being somewhat important to the SEO, but not really required in my opinion.
Then the next part will be many too I assume for most people. Link tags define alot of things: favicon, stylesheets, rss’s, and pingbacks. I have all of those of course. They are necessary just a simple fact.
That’s all for defining my XHTML. Here is what the final definition and header looks like: