WordPress.org

Ready to get started?Download WordPress

Forums

Validating A Site (6 posts)

  1. med103
    Member
    Posted 8 years ago #

    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 http://www.michaeldoig.net 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.
    Thanks,
    Mike

  2. zeroK
    Member
    Posted 8 years ago #

    Well, JavaScript normally belongs between

    <script type="text/javascript">
    <!--

    and
    //-->
    </script>

    Sometimes you will also see something like this:

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

    // ]]>
    </script>

    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 :)

  3. lxg
    Member
    Posted 8 years ago #

    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">
    //<![CDATA[
    alert('This is my JS!');
    //]]>
    </script>

    i.e. marked as CDATA properly.

  4. TechGnome
    Moderator
    Posted 8 years ago #

    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.

    --tg

  5. med103
    Member
    Posted 8 years ago #

    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.
    Mike

  6. med103
    Member
    Posted 8 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic