Re: i found error in html parser

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 UTC