Re: Validations..Help!!

by "Donna M Smillie" <dms(at)zetnet.co.uk>

 Date:  Wed, 23 Feb 2000 08:45:20 -0000
 To:  "Rayne Alburquerque" <rayneal(at)home.com>,
<hwg-basics(at)hwg.org>
 References:  default co amtech
  todo: View Thread, Original
Hi Rayne

I couldn't see anything wrong with the code you used as an example, so I
created a mini test page using exactly that code copied and pasted from
your email, with an HTML 4.0 Transitional DTD, ran it through the W3C
validator, and got:

No errors found!

Which makes me wonder:

a. What DTD are you using?
b. What validator are you using?
c. Did you remove any code to simplify the example?  The validation
error in the original email that started this thread showed a <br> tag
inside the main list opening and closing tags but not contained within
LI  /LI tags.

As an aside -  I'd change your code example to include the sub-list
*inside* the "Item 1" LI tags, like so:

<ul>
    <li>List item one
        <ul>
            <li>Sub list item one</li>
        </ul>
    </li>
    <li>List item two</li>
</ul>

This simply changes the logic to show that the sub-list is attached to
list item 1, rather than occupying a list item of its own.  However the
syntax is exactly the same, with the sub-list contained within one set
of opening and closing LI /LI tags of the main list.

Regards,
Donna
--
dms(at)zetnet.co.uk
Different Worlds:  http://www.users.zetnet.co.uk/dms/
Pictures of the Past, The Leslie Smith Family,
An Introduction to HTML, Copyright Considerations
Online Bookshop

----- Original Message -----
From: Rayne Alburquerque <rayneal(at)home.com>

> I have a question about the <li> tags. Here is the code:
>
> <ul>
> <li>Item 1</li>
> <li>
>     <ul>
>     <li>Item 1 sub</li>
>     </ul>
> </li>
> <li>Item 2</li>
> </ul>
>
> Can anyone explain what is wrong with the code that would cause the
> validation error? It tells me that the inside <ul> tag is not valid
where
> placed. When taking out the end <li> tag for the nested list, It
validated
> correctly.
> If they are optional, shouldn't it work?

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA