Part 1: Defining The Document

h3. Definition

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 lang and 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.


h3. Header

The next part of defining the document is the header of course. This is part that can get a little over-done. What I mean by that is internal javascript and meta tags. Sure we all have them sometimes, but some sites just have way too many.

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.





The final part is the dreaded part I have about many sites. The script tag. Inline CSS, inline javascript, just horrible in my opinion. It’s ok for an example sure, but for a real site, no. Of course, I’m just a beginner, so take my opinion with a grain of salt.

If you want to use javascript, and I might at some point, we must use this:


That’s all for defining my XHTML. Here is what the final definition and header looks like: