[resolved] Need help with code error found on w3c (5 posts)

  1. azsunshine
    Posted 2 years ago #

    Not being code savvy, can someone please tell me how to fix this error that was found for my site using w3c. Here is the error:

    Line 142, Column 23: document type does not allow element "span" here;
    assuming missing "li" start-tag
    <ul><span class="arri"></span><span class="arri2"></span>

    Line 143, Column 7: document type does not allow element "li"here; missing one of "ul", "ol" start-tag

    I've located the code on my site. Here's how it reads:

    <ul><span class="arri"></span><span class="arri2"></span>

    Thanks, I appreciate your time and help.

  2. WPyogi
    Forum Moderator
    Posted 2 years ago #

    Depends where that code is being generated. What theme are you using and/or what is the site URL?

  3. Take a look here for general explanations of your validation errors:

    Explanation of the error messages for the W3C Markup Validator

    Looking at your snippet, I imagine it's complaining that you're using a span tag directly after a ul tag, which is invalid. Off the top of my head, I'm pretty sure only an li tag is allowed there.

    It needs to be more like this:

    <li><span class="arri"></span><span class="arri2"></span></li>
  4. azsunshine
    Posted 2 years ago #

    Thank you so much Scriptrunner! That was the issue!

  5. @jaycee29 You're quite welcome. Good luck and happy coding!

Topic Closed

This topic has been closed to new replies.

About this Topic