W3C home > Mailing lists > Public > www-validator@w3.org > June 2007

Re: Error regarding <ul> tag within a <ul>

From: Olivier Thereaux <ot@w3.org>
Date: Wed, 6 Jun 2007 06:27:01 +0900
To: webmaster@kpkammer.8k.com
Cc: www-validator@w3.org
Message-ID: <20070605212700.GA4327@w3.mag.keio.ac.jp>

On Mon, Jun 04, 2007, Kenton P. Kammer wrote:
> I am trying to validate http://bass.kpkammer.com/index.html.
> 
> I receive 3 errors  (all the same line 28,34,&40) regarding the unordered list tag (<ul>).
> The error states:
> 
>    Error         Line 28,             column 7:         document type does not allow element "UL" here; assuming missing "LI" start-tag .
>      <ul>
> 
> I don't understand why there is an error.  My code reads (line 1 is line 25):
> 
>      <ul>
>        <li><a href="/index.html">Home</a></li>
>        <li><a href="/calendar/index.html">Calendar</a></li>
>        <ul>

In HTML, you can't have a <ul> within a <ul>. You have to have the
second-level <ul> in a <li>, like this:
<ul>
  <li>first level stuff
   <ul>
    <li>some stuff</li>
    <li>some more stuff</li>
   </ul>
  </li>
</ul>

-- 
olivier
Received on Tuesday, 5 June 2007 21:27:06 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:24 GMT