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

First off, thank you for explaining this.

Second, when I create xhtml with nested <p>...<p>...</p>...</p> the
validator accepts it. Should it not or are nested ones ok in xhtml?

Third, is there a good way to convert tabs when creating html? The situation
I am in I can't use tables and so I am left using a spacer.gif file and
setting it's size to do spacing - but that is not a great solution.

thanks - dave


----- 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 Saturday, 19 April 2003 11:31:49 UTC