Hello, My site is here and its validation result is here. All the errors are from javascript's document.write function writing out some of the xhtml. What's actually wrong with it and how can I fix it? Also, is there really any benifit SEO wise to having valid code?
There is benefit to having valid html code, yes. Also a benefit to people with screen-readers, text-only browsers, and people who don't use mice. As far as I've learned on this forum, spiders ignore javascript. I noticed that while you have a css sheet, you aren't taking full advantage of it. <ul class="nav_top"> <li><a href="http://www.coffeesh0p.com/disclaimer/" class="nav_top" title="Disclaimer">Disclaimer</a> ::</li> Code (markup): Why not ul class="nav_top"> <li><a href="http://www.coffeesh0p.com/discalimer/">Disclaimer ::</a></li> Code (markup): I dunno if you need the whole webaddress needed in the link. If your site was made up of .html pages, you would only write href="disclaimer.html" I wonder if you could change your doctype (temporarily) to html4.1 to see if that affected anything.
Thanks for your reply. The problem, I think, is the validator picking up the elements in document.write() and thinking they're inside script tags, which is why they shouldn't be there. I was hoping there was some way to fix it. Also, I didn't notice I was still using the classes for each link. I shall remove those now. As for the absolute linking, it's just preference. Linking to /disclaimer/ works the exact same was as you suggest with html pages.
Just enclose your scripts like this: <script type="text/javascript"><!-- ... --></script> Code (markup): and the page will validate.
Next question: Is it worth it, breaking my colourscheme, looking a bit out of place, to include the validator images? I wonder if google looks to see'f you have links to the validator, as a general idea of whether or not a site is valid, and gives you points accordingly? Obviously, no one could know if google did do that, or everyone would link to them, even if the site wasn't valid. That wasn't a serious question btw, I was just thinking up another google conspiracy.