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 6925 - <p><pre>...</pre></p> ==> end tag for element "P" which is not open
Summary: <p><pre>...</pre></p> ==> end tag for element "P" which is not open
Alias: None
Product: Validator
Classification: Unclassified
Component: Parser (show other bugs)
Version: HEAD
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
Depends on:
Reported: 2009-05-20 10:34 UTC by Aleksey Cheusov
Modified: 2009-05-20 21:21 UTC (History)
0 users

See Also:


Description Aleksey Cheusov 2009-05-20 10:34:55 UTC
The following construct is checked incorrectly in HTML 4.01-Strict mode
and others.
Test URL:

Full html code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"

<html> <head> <title></title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >


 Hello world

Comment 1 Ville Skyttä 2009-05-20 21:21:28 UTC
This is not a bug, but a real error in your markup.  <p> may contain only inline elements in HTML 4.01, and because <pre> is not an inline element, your <p> is implicitly closed before it, like:

</p>  <!-- paragraph ends here because of the following <pre> -->
</p>  <!-- end tag for p which is not open, like the validator says -->