Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
Like Tree2Likes
  • 1 Post By sarahswansea
  • 1 Post By dansbanners

Thread: Error msg in W3 Validator

  1. #1
    Junior Member
    Join Date
    Oct 2015
    Posts
    14
    Member #
    52369
    Liked
    1 times

    Error msg in W3 Validator

    The following codes:

    <li class="widget">
    <h2>Recent Posts</h2>
    <ul>
    <li><a href="filename1.html">text one</a></li>
    <li><a href="filename2.html">text two</a></li>
    </ul>
    </li>
    Is creating the following error message in the W3C validator:

    "Line 188, Column 25: document type does not allow element "li" here; missing one of "ul", "ol", "menu", "dir" start-tag"

    Is there a way around this? Please advise. I'd appreciate it. Thanks in advance!

  2.  

  3. #2
    Senior Member sarahswansea's Avatar
    Join Date
    Oct 2015
    Location
    Swansea, UK
    Posts
    156
    Member #
    52184
    Liked
    65 times
    Can we see the full code?

    It might just be as simple as needing <ul> around your outer <li>

    Code:
    <ul>
        <li class="widget">
        <h2>Recent Posts</h2>
        <ul>
            <li><a href="filename1.html">text one</a></li>
            <li><a href="filename2.html">text two</a></li> 
        </ul>
        </li>
    </ul>
    dansbanners likes this.

  4. #3
    Junior Member
    Join Date
    Oct 2015
    Posts
    14
    Member #
    52369
    Liked
    1 times
    Quote Originally Posted by sarahswansea View Post
    Can we see the full code?

    It might just be as simple as needing <ul> around your outer <li>

    Code:
    <ul>
        <li class="widget">
        <h2>Recent Posts</h2>
        <ul>
            <li><a href="filename1.html">text one</a></li>
            <li><a href="filename2.html">text two</a></li> 
        </ul>
        </li>
    </ul>
    I found that changing <li class="widget"> to <div class=widget"> did the trick. The funny thing is that I actually got the original codes as presented in the op from my previous site that was actually a wordpress site with its built-in codes and all. So it got me thinking that what worked there will also work in my current, non-wordpress site. Thanks for pointing me in the right direction though.
    sarahswansea likes this.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 07:08 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com