Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Can lists be nested?


  • Please log in to reply
4 replies to this topic

#1 Ray Parrish

Ray Parrish

  • Members
  • 91 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Cottage Grove, Oregon
  • Local time:05:00 AM

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,

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

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

Edited by Ray Parrish, 06 November 2008 - 12:08 AM.


BC AdBot (Login to Remove)

 


#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:07:00 AM

Posted 06 November 2008 - 07:02 AM

What doctype are you using?

#3 Ray Parrish

Ray Parrish
  • Topic Starter

  • Members
  • 91 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Cottage Grove, Oregon
  • Local time:05:00 AM

Posted 06 November 2008 - 08:11 AM

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">ComparingWindows and Ubuntu Linux</a></li>          <li><a href="Linux%20distributions%20and%20documents.html">LinuxDistributions and documentation</a></li>          <ul>            <li><a href="scripts/SysReport.html">System Report forUbuntu</a></li>          </ul>          <li><a href="Troubleshooting%20and%20fixing%20Windows.html">Troubleshootingand fixing Windows</a></li>          <li><a href="Troubleshootings%20Tools%20for%20Windows.html">TroubleshootingTools for Windows</a></li>          <li><a href="Windows%20XP%20SP3%20installation.html">WindowsXP 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

Edited by Ray Parrish, 06 November 2008 - 08:16 AM.


#4 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:07:00 AM

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

#5 Ray Parrish

Ray Parrish
  • Topic Starter

  • Members
  • 91 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Cottage Grove, Oregon
  • Local time:05:00 AM

Posted 06 November 2008 - 02:06 PM

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

Edited by Ray Parrish, 06 November 2008 - 02:07 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users