W3C home > Mailing lists > Public > www-validator@w3.org > February 2005

Re: i found error in html parser

From: David Dorward <david@dorward.me.uk>
Date: Fri, 4 Feb 2005 08:14:10 +0000
To: Tomas <tomas.hajek@iplato.net>
Cc: www-validator@w3.org
Message-ID: <20050204081410.GD13619@us-lot.org>

On Thu, Feb 03, 2005 at 05:08:24PM +0100, Tomas wrote:
>     
>    i try to valid code bottom and can't found any error, but parser
>    say:problem with </p>, but all looks fine

>            <p>
>            <div class="p_right"></div>
>            </p>

End tags for <p> elements are optional in HTML. <div> elements may not
include <p> elements. So opening a div implies closing the
paragraph. Therefore you code means the same as:

<p></p>
<div class="p_right"></div>
</p>

and you are closing a paragraph that isn't open. This is not a bug in
the validator.

-- 
David Dorward                                      http://dorward.me.uk
Received on Friday, 4 February 2005 08:14:18 GMT

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