Re: Validations..Help!!

by "Rayne Alburquerque" <rayneal(at)home.com>

 Date:  Wed, 23 Feb 2000 07:43:28 -0600
 To:  "Donna M Smillie" <dms(at)zetnet.co.uk>,
<hwg-basics(at)hwg.org>
 References:  default co amtech co2
  todo: View Thread, Original
Donna, to answer your questions:

I downloaded the HTML-Kit from the W3C web site link. It was set to
transitional 4.0 and I used the W3C validator that comes with it.

I didn't change any code. and I thought I tried putting the nested list
inside the 1st item like you mentioned. For some reason it wouldn't validate
unless I took out the end tag for whichever list item that had the nested
list.

Strange!
Rayne

----- Original Message -----
From: Donna M Smillie
To: Rayne Alburquerque ; hwg-basics(at)hwg.org
Sent: Wednesday, February 23, 2000 2:45 AM
Subject: Re: Validations..Help!!


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