W3C home > Mailing lists > Public > www-validator@w3.org > April 2003

Re: I think I've found a file that fails & shouldn't

From: David Thielen <dave@windward.net>
Date: Fri, 18 Apr 2003 14:17:37 -0600
Message-ID: <056c01c305e7$8dd8dd50$69f72dc7@BAMBI>
To: "Terje Bless" <link@pobox.com>, "W3C Validator" <www-validator@w3.org>

ok - thank you


----- Original Message -----
From: "Terje Bless" <link@pobox.com>
To: "W3C Validator" <www-validator@w3.org>
Cc: "David Thielen" <dave@windward.net>
Sent: Friday, April 18, 2003 2:09 PM
Subject: Re: I think I've found a file that fails & shouldn't


> David Thielen <dave@windward.net> wrote:
>
> >There is a <p> ... tons of elements ... </p> but they are balanced.
>
> As an alternate way of stating what others have allready said:
>
> <p> elements are not allowed to nest so that when the Validator (or a
> browser) sees an opening "<p>" tag it will automatically close (insert
> "</p>") any <p> element that is open at that point.
>
>
> <p>    <!-- Opens first P element -->
>   <p>  <!-- P cannot nest; close first P before opening second P -->
>   </p> <!-- Closes second P element -->
> </p>   <!-- Error, there are no open P elements at this point. -->
>
>
> In XHTML (which is stricter then HTML 4) you would have gotten an error at
> the second <p> because in XHTML elements are not allowed to have omitted
> end tags. HTML 4 is more permissive so it lets you get away with the first
> implied end tag, but will then complain when you have an apparently
> extraneous end tag at the end.
>
> One good way to discover this kind of error is to turn on the Validator's
> Verbose mode and look at the Parse Tree. It would have showed you where
the
> Validator inserted the implied </p> in the above code.
>
> --
> Now Playing "Strange Fruit" by "Nina Simone"",
>  from the album "Feeling Good - The Very Best Of".
>
Received on Friday, 18 April 2003 16:17:53 GMT

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