Bug <PRE

For technical support and bug reports for all editions of CSS HTML Validator, including htmlval for Linux and Mac.
Post Reply
User avatar
roedygr
Rank V - Professional
Posts: 367
Joined: Fri Feb 17, 2006 5:22 am
Location: Victoria BC Canada
Contact:

Bug <PRE

Post by roedygr »

If there is a <PRE section inside a <p>...</p> HTMLValidator will complain the <p> are unbalanced.

I am not sure if PRE is supposed to be allowed in <p>, but if it is not, the error message should say "<PRE must not be nested inside <P>...</P>", not "<P> unbalanced".
User avatar
Albert Wiersch
Site Admin
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Bug <PRE

Post by Albert Wiersch »

Hello,

The <pre> tag implies a </p> end tag so p is ended at that point. This is allowed so it's not an error and there is no message to generate. When it gets to the explicit </p> it sees that p is not open anymore and generates the error you are seeing.

It may be possible to improve the message by checking to see whether p was ended by implication and, if so, assume one was trying to put a "pre" element inside a "p" element.... so I will look into this improvement.

Thanks.

UPDATE: This has been improved for v15. If you'd like to try a v15 BETA, then please email or PM me.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
Post Reply