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 1172 - Nesting errors accepted for HTML 2.0, 3.2, 4.01
Summary: Nesting errors accepted for HTML 2.0, 3.2, 4.01
Status: RESOLVED WORKSFORME
Alias: None
Product: Validator
Classification: Unclassified
Component: check (show other bugs)
Version: 0.6.7
Hardware: Other Linux
: P2 normal
Target Milestone: ---
Assignee: Terje Bless
QA Contact: qa-dev tracking
URL: http://validator.w3.org
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-18 17:05 UTC by Martin Ultima
Modified: 2005-04-07 01:23 UTC (History)
0 users

See Also:


Attachments

Description Martin Ultima 2005-03-18 17:05:23 UTC
I was recently going through an old book I had teaching how to write HTML and
creating a Web site explaining all the problems with its code (horribly invalid
is the nicest way I can say it), and discovered a bug with paragraph nesting.  I
had uploaded the file from my hard disk and set up a few overrides:

DOCTYPE - HTML 2.0
ENCODING - UTF-8

(the original had no valid DOCTYPE declaration) and oddly enough it accepted the
following code:

<P>I made it...</P>
<BR>to tell everyone about me

I believe this is a nesting error (the paragraph tag is specifically closed, yet
the line break is allowed outside of it), but am not entirely sure.  At any
rate, I tried it with HTML 3.2, then 4.01 Transitional, then XHTML 1.0
Transitional, and only the last one failed to validate (and that was only
because the document was in all uppercase, which I understand is not allowed in
XHTML).
Comment 1 Bj 2005-03-18 18:09:36 UTC
Chances are that this is perfectly legal in those document types as it depends 
on the content model of the parent element of the br element whether it is 
allowed at that position, for example, in HTML 4.01 Transitional you can use

<body>
...
<br>
...
</body>

while you can't do that in HTML 4.01 Strict.
Comment 2 Olivier Thereaux 2005-04-07 01:23:48 UTC
Without a sample document / URI, and given that nesting validation is fairly well tested, I agree with 
Comment #1, and think the particular markup given in comment #0 probably was valid in its context.