Support » Themes and Templates » Validating my blog

Viewing 5 replies - 1 through 5 (of 5 total)
  • If you check the “Show Source” box and click Revalidate – every line with errors will become a clickable link and you could see exactly where your errors are.

    Uh… thanks for your quick reply, but the problem is that I don’t even know what they mean xD
    I gave a few attempts but when I tried to revalidate it, I only got more errors!

    “1. Error Line 109 column 3: document type does not allow element “li” here; missing one of “ul”, “ol”, “menu”, “dir” start-tag.”

    This means that you have a list on your page that simply begins with the <li> tag. That’s improper formulation of lists. Your lists should look like so:

    <ul> (or <ol> for a numbered, ordered list)
    (or </ol>)

    They are also telling you that it’s possible that your have your li tags formed properly, but you’ve forgotten to close one someplace. *Or* that you’ve placed a block-level element (like a <p> tag) within an inline element (like a <span> tag) which is a no-no.

    Google for the difference between “inline” and “block level” so you know what’s up there.

    “2. Error Line 121 column 33: document type does not allow element “table” here; assuming missing “li” start-tag.

      <table id=”wp-calendar”>”

      Why you are putting a table *within* an unordered list is absolutely confounding. There is no need whatsoever to do this. Either put the information in a table (if it’s tabular data) or put it in a <ul> list. Don’t do both. There’s no reason for it at all.

      “3. Error Line 160 column 13: end tag for “li” omitted, but OMITTAG NO was specified.


    This goes with the above – you used the <ul> tag with no <li>. Don’t do that. If you fix this error, a *lot* of these errors will simply go away. If you use <ul> then you *must* have <li> as well.

    I could continue on – but it pretty much looks the same. You have <ul> tags with no <li> tags – which is a no-no. And in some cases you have <li> tags with no prior opening <ul> tags.

    You can go through and fix all of these errors – but I’m guessing that it’ll cause a big headache if you don’t know CSS, cause it’s gonna screw up your layout. When you remove those incorrect tags, then your “boxes” will move around in a way that you don’t want, and you need to use proper CSS to position them correctly (which, when it comes to CSS, I’m guessing you’re pretty new at or you wouldn’t be asking this question 😉 )

    An alternative solution would be to just change your doctype. It may not fix everything, but it’ll render it better if you swap out your doctype from XHTML 1.0 Transitional (which you are currently using) to HTML 4.0 Transitional. You just need to swap it out in the header.php file.

    Change these lines:

    ” <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “”>
    <html xmlns=””>”

    to this:

    “<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “”>”

    The latter will recognize deprecated tags and “messed up” code (to an extent) as well as allow for the newer tags.

    Hope that helps you.

    An alternative solution would be to just change your doctype.

    I am not sure that’s a wise idea 🙂
    WP template tags and the engine itself generate code to be valid for XHTML Transitional 1.0 – so you may end up with even more errors.

    That greatly helped! Thank you!

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