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
Status: RESOLVED INVALID
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
URL: http://mova.org/~cheusov/pub/pkgsrc-d...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-20 10:34 UTC by Aleksey Cheusov
Modified: 2009-05-20 21:21 UTC (History)
0 users

See Also:


Attachments

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: http://mova.org/~cheusov/pub/pkgsrc-distbb/Linux/current/logs/20090517.1016/META/test.html

Full html code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">

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

<body>

<p>
<pre>
 Hello world
</pre>
</p>

</body>
</html>
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>
</p>  <!-- paragraph ends here because of the following <pre> -->
<pre>
...
</pre>
</p>  <!-- end tag for p which is not open, like the validator says -->