This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5508 - </p> flagged as not required when there is a matching <p>
Summary: </p> flagged as not required when there is a matching <p>
Alias: None
Product: Validator
Classification: Unclassified
Component: check (show other bugs)
Version: HEAD
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
Depends on:
Reported: 2008-02-27 20:53 UTC by Robert Brown
Modified: 2008-04-17 12:08 UTC (History)
0 users

See Also:


Description Robert Brown 2008-02-27 20:53:03 UTC
Starting line 170, </p> is being flagged (twice) as not required because there is no open <p> element, when in fact there is an opening <p> just a few lines above it in both cases.
Comment 1 Olivier Thereaux 2008-04-17 12:08:37 UTC
The example document at the given URI has many errors but not the one you mention. 

In HTML some end tags can be omitted, and some constructs will be interpreted as implicitly closing them.
<p>some content<div></div></p>
will be interpreted, in HTML, where a <p>cannot contain a <div> but can be implicitely closed, as:
<p>some content</p><div></div></p>
You can see why the validator will see an issue with the </p>

If you don't want this (implicit closing), you can use XHTML where all end tags are required.