For no real reason, I have declared this:
There are some very good reasons to use a 4.01 or html 5 declaration over XHTML.
In "the beginning" XHTML was meant to be a cross between HTML and XML, which would allow you to create your own tags and define what those tags are. My favorite example:
<p><movie>The Titanic</movie> was a movie about a passenger ship named <shipname>Titanic</shipname> of <adverb>titanic</adverb> proportions.</p>
Combined with a custom DTD that defined the meaning of those tags, this was supposed to provide
context to the search engines and other machine devices, which ordinarily cannot extract the meaning of the three words in that paragraph.
For whatever reason, my guess is in reaction to the possibility (probability) of abuse, it never really took off. Yet many developers (blindly?) uses XHTML doctypes, claiming it's the latest and greatest, often with derisive comments like "html 4.01 is so 1990's." One argument is that is makes for cleaner code, which is only partly true. You can be equally strict with your code in 4.01, as you're discovering with validation.
So if you're not doing any
extending of the HTML set, allow your document declaration to accurately define the contents of the document: plain old HTML.
Many here can help you debug validation problems. Know that often, a single error can cascade to other areas, and fixing the first may make subsequent errors go away. One example is
scriptname.php?this=that&these=those
Ampersands, even in URL's, need to be encoded or converted to entities:
scriptname.php?this=that
&these=those
EDIT:ARGH . . . since when does this site parse entities? What you want there is the ampersand
&
next to the rest of the entity
amp;
with no spaces between.