BleepingComputer.com: Can lists be nested?

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Can lists be nested? I am nesting lists and it doesn't pass validation.

#1 User is offline   Ray Parrish 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 91
  • Joined: 30-October 08
  • Gender:Male
  • Location:Cottage Grove, Oregon

Posted 06 November 2008 - 12:07 AM

Hello,

I'm trying to get my front page at my web site to validate, and the validator is tossing two of the following errors at me,

Line 60, Column 11: document type does not allow 
element "UL" here; assuming missing "LI" start-tag       <ul>


The only thing that I can think of that might be causing it is that nesting lists in not allowed. Is this a correct assumption?

Thanks, Ray Parrish

This post has been edited by Ray Parrish: 06 November 2008 - 12:08 AM


#2 User is offline   groovicus 

  • Hail Groovicus!
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Moderator
  • Posts: 9,605
  • Joined: 05-June 04
  • Gender:Male
  • Location:Centerville, SD

Posted 06 November 2008 - 07:02 AM

What doctype are you using?
"Take the risk of thinking for yourself, much more happiness, truth, beauty, and wisdom will come to you that way" - Christopher Hitchens

#3 User is offline   Ray Parrish 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 91
  • Joined: 30-October 08
  • Gender:Male
  • Location:Cottage Grove, Oregon

Posted 06 November 2008 - 08:11 AM

View Postgroovicus, on Nov 6 2008, 04:02 AM, said:

What doctype are you using?


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

That's it there. All of my other pages have passed validation. Here are the errors I'm getting -

# Error Line 56, Column 11: document type does not allow element "UL" here;
assuming missing "LI" start-tag.

<ul>


# Error Line 66, Column 13: document type does not allow element "UL" here;
assuming missing "LI" start-tag.

<ul>

And here is my list which is causing the errors

      <ul>
        <li><a href="Computer.html">Computer</a></li>
        <ul>
          <li><a href="Hard%20Drives.html">Hard Drives</a></li>
          <li><a href="Computer%20Tips%20and%20Tutorials.html">Computer Tips</a></li>
          <li><a href="Comparison%20of%20Windows%20and%20Ubuntu%20Linux.html">Comparing
Windows and Ubuntu Linux</a></li>
          <li><a href="Linux%20distributions%20and%20documents.html">Linux
Distributions and documentation</a></li>
          <ul>
            <li><a href="scripts/SysReport.html">System Report for
Ubuntu</a></li>
          </ul>
          <li><a href="Troubleshooting%20and%20fixing%20Windows.html">Troubleshooting
and fixing Windows</a></li>
          <li><a href="Troubleshootings%20Tools%20for%20Windows.html">Troubleshooting
Tools for Windows</a></li>
          <li><a href="Windows%20XP%20SP3%20installation.html">Windows
XP SP3 installation</a></li>
          <li><a href="Why%20Dual%20Boot.html">Why Dual Boot?</a></li>
        </ul>
        <li><a href="Internet.html">Internet</a> </li>
        <li><a href="Video.html">Movies and TV</a> </li>
        <li><a href="Programming.html">Programming</a> </li>
      </ul>


I did just find one <br> tag in the middle of that mess and removed it.

Later, Ray Parrish

This post has been edited by Ray Parrish: 06 November 2008 - 08:16 AM


#4 User is offline   groovicus 

  • Hail Groovicus!
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Moderator
  • Posts: 9,605
  • Joined: 05-June 04
  • Gender:Male
  • Location:Centerville, SD

Posted 06 November 2008 - 08:41 AM

Just glancing through quickly, it appears that you have mismatched tags. See if this helps:
http://www.w3schools.com/XHTML/xhtml_html.asp
"Take the risk of thinking for yourself, much more happiness, truth, beauty, and wisdom will come to you that way" - Christopher Hitchens

#5 User is offline   Ray Parrish 

  • Member
  • PipPip
  • Find Topics
  • Group: Members
  • Posts: 91
  • Joined: 30-October 08
  • Gender:Male
  • Location:Cottage Grove, Oregon

Posted 06 November 2008 - 02:06 PM

View Postgroovicus, on Nov 6 2008, 05:41 AM, said:

Just glancing through quickly, it appears that you have mismatched tags. See if this helps:
http://www.w3schools.com/XHTML/xhtml_html.asp


That was it! Thank you very much. It's a little odd to me the way that is done, but now that I know I can nest lists with no problem.

Later, Ray Parrish

This post has been edited by Ray Parrish: 06 November 2008 - 02:07 PM


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users