UR Code Dilemma??

by 8 replies
10
Hey Gang,

I put a text widget in my wordpress sidebar to build links...but I am having a problem when I validate it with W3C validation service... It is returning the following error and I can't figure out how to fix it...
Line 173, Column 49: document type does not allow element "li" here; missing one of "ul", "ol", "menu", "dir" start-tag

<li id="pages-3" class="widget widget_pages"><h2>Home Page</h2>
--------------------------------
Here is the code format that i am putting into my sidebar widget.

<ul>
<li><a href="http://blahblahblah.com/blah.php" rel="nofollow" target="_blank">blah blah</a></li>
<li><a href="http://boogelywoogely.com/boogely.php" rel="nofollow" target="_blank">boogely Woo</a></li>
<li><a href="http://wombambaloobop.com/wombamboo.php" rel="nofollow" target="_blank">ding de dong</a></li>
</ul>

===> of course these are not my actually links & websites.... Just wanna make people smile!

just wondering what I'm missing, and/or what I'm doing wrong?

In Many Thanks,
tom
#programming #code #dilemma #li code #sidebar #ur code
  • I validated the code as you have entered in here in the forum.

    I can tell you that the quotes around the nofollow is incorrect. These are special microsoft style quotations that break html.

    Do you see the difference between the quotes around the nofollow and the rest of the quotes in the string?

    As for the error you reported above ...
    document type does not allow

    The key word is document type. Try setting the doc type to XHTML 1.0 Transitional.

    This information was not included in your post, so I have no idea what the current doc type is set to.
    • [1] reply
    • AH Man Thanks You SOOOO Much!!! Good eye in detecting this.

      This was absolutely driving me nuts... Well, I guess that's the price you pay for doing a copy & paste with HTML code.

      I'm not good would HTML, so I would of never noticed that those quotes would have made a difference.

      Once again,
      Thanks You So Much!

      Tommy
      • [1] reply
  • [DELETED]
  • This is an issue with some other part of your website, not just what you are putting into your widget.

    I have the code above in a file all by its self here ...
    Untitled Document
    It validates perfectly.
    [Valid] Markup Validation of http://freelinkcloaker.com/test.html - W3C Markup Validator

    We cant help if you dont provide a url or anything.
    • [1] reply
    • Thanks guys,

      I contacted flexsueeze theme service and they said I have the old version and that I need to upgrade to fix these issues.

      In Many Thanks!

Next Topics on Trending Feed

  • 10

    Hey Gang, I put a text widget in my wordpress sidebar to build links...but I am having a problem when I validate it with W3C validation service... It is returning the following error and I can't figure out how to fix it...Line 173, Column 49: document type does not allow element "li" here; missing one of "ul", "ol", "menu", "dir" start-tag