So that your site can be properly validated for standards - each page on your site requires a document type declaration which begins at the top of every XHTML page and and tells a validator which version of HTML to use in checking the document’s syntax.
The 2 most popular DOCTYPEs i have seen for web designers wanting to accomplish 100% validation is:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
and
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
Where the first one declares the page XHTML 1.0 Strict and the second one declares the page XHTML 1.0 Transitional.
Of the 2 i personally use Strict now as i find it alot more friendly when coding complex sites in 100% CSS
There is also HTML DOCTYPEs for developers not using XHTML but now a days i think everyone serious about Web Site validation is using XHTML
Visit this link to check your site for validation http://validator.w3.org/
The best thing about using this validation service is that not only does it check your script for validation it will also let you know if you have forgotten to end an DIV tag or TABLE tag. Very good for bug testing.
The most important things to remember when validating XHTML is:
- write your code in lowercase
- never skip ending tags like </p> or for images <img src=”" mce_src=”" /> or <br />
- elements must always be nested properly
- elements must always be closed
- nested lists always use an ending tag </li>
- XHTML documents must have one root element
- Use CSS as much as you can for your elements.
- ID classes can only be used once per document, use CLASS for multiple tags
Its 2am in the morning now, so i might add some more information at a later date.


