Posted 26 August 2003 - 02:53 PM
DocType, by the simpliest definition, is simply a declaration as to what HTML version the page is coded in. Of course it goes a lot farther than that since there are different ways to code web pages (XHTML, MathML, SVG and combinations) but most people won't be dealing with that kind of thing. So no need to further confuse the issue.
Doctypes were originally introduced in an effort to create standards-based browsers. Back in the old days (we're talking the mid- to late-90's here) things were getting totally out of control. The big two browser manufacturers (Internet Explorer and Netscape) kept coming out with new models which introduced a lot of proprietary technology into the mix in an effort to gain market share on each other. Both wanted to have the "latest, greatest feature" that the other didn't have of course.
The problem was that as the browser war went on many of these new browser versions tended to break old pages. ie...Something which worked in IE4 many times wouldn't work in Netscape 4.05. Even to the point that some things which worked in Netscape 4.74 may or may not work in Netscape 4.75. It was nuts because you could design a site which worked perfectly, and then 6 months later it nothing worked at all in the new crop of browsers.
Today Doctypes are controlled by the Worldwide Web Consortium (W3C.org), the end-all and be-all of Web Usability and Compatibility issues. As noted above Doctypes do not mean much to 99.9% of the browsing population. Browser manufacturer's use the Doctype DTD (Document Type Definition) rules when they're building a new browser version of course, however forthe average web site designer out there they really don't mean much honestly.
If your pages do not "Validate" properly this can certainly affect your SEO potential, but it's very, very rare to have something messed up enough to not be indexed at all. If that's the case, chances are the page won't display properly either so you would know right away. Most sites created over the last few years are going to fall into at least the HTML 4.01 loose.dtd specification. Which will get you spidered just fine thank you very much.
There are only three times which I can think of where you would have to pay special attention to DocType and whether your site validates perfectly to the W3C standards...
1.) If you wanted to put the little W3C.org graphic on your site showing that your site does indeed validate. If you want to display that graphic you'd better make sure the page validates correctly because it's easy to tell if someone is fibbing the least little bit.
2.) If you're creating a site which is targeted towards those who have a disability, especially involving their eyesight. In that case you'll definitely want to give yourself every advantage of being able to attract this audience and "speak" to them (many sight impaired surfers use some sort of speech software which will literally read the page to them.)
3.) If you're designing a site for a governmental body, public school or university. There was a federal law passed a couple of years ago in the US which said all governmental sites and the web sites of anyone who receives funding from the federal government should meet the disability/usability standards by this past spring if they wanted to continue receiving funding. Most haven't done it of course, but the Fed's haven't pushed the issue either. I do know of a few universities who have dealt with these usability compliance issues because I helped them through the process of updating their 10,000+ page sites. :hehe: I dare ya to give that one a try sometime when you have a lot of free time on your hands.
For the average Joe or Josephine Web Designer, it doesn't make much difference though. If the pages display fine in the major browsers you'll be just fine.
For more detailed info on Doctypes visit W3C.org and search their site for "Doctype". There is a wealth of info there since that's where the concept orginates from. Also, if you want to validate your code, Dave Raggett over at W3C developed a little tool called HTML Tidy years ago to do just that. He's passed the project on to others now, but they still list links to it at W3C if you do a search for this free tool there.