Support » Fixing WordPress » Validating A Site

  • Hello,
    I’ve read through the codex page on validating a site, I understand XHTML and CSS, however it seems like no matter what I do I can’t get my site to validate. The CSS fails because it says I need to validate my XML file and the XHTML fails because of some javascript I have. Can anyone give me some advice on both getting it to validate and figuring out the cryptic messages the validator returns.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Well, JavaScript normally belongs between

    <script type="text/javascript">


    Sometimes you will also see something like this:

    <script type="text/javascript">
    // <![CDATA[

    // ]]>

    You also have things like
    <h1><a href=“”?PHPSESSID=e11072c710c6dc7fed25a9321d5b13f5>Michael Doig - An Intelligent Mix Of Design And Marketing</a></h1>where the value is actually after the quotes and the quotes are not normal ” but some other UTF-8 characters.

    There are also quite a few <input/>s lacking the / at the end 🙂



    1. Your Blog title seems to contain strange characters. Possibly you have specified a wrong charset in the WP options or you use invalid characters.

    2. The JS should look like this:

    <script type="text/javascript">
    alert('This is my JS!');

    i.e. marked as CDATA properly.

    Sometimes one little error will cause a cascade of errors unrelated. Most times those will fix themselves after fixinf the first one.

    The first thing I’d do is open your template and look to see where the site header (the first h1 tag) is listed and change those funny quotes into regular ones.


    Thanks everyone, I think I needed a second set of eyes to look over that and get me on track. I fixed a bunch of them, however I can’t seem to get these last few errors to go away. There is something weird with the form and table elements and I’ve checked and double checked the code where it says I’m missing end tags and they’re in my template so I’m not sure how to fix them. Once again thank you for any advice.

    I think I’ve got the hang of it now. I think I was getting confused with the way it was revealing the errors. I was looking for < or > tags and in reality it was a whole </div> tag. Thanks again.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Validating A Site’ is closed to new replies.