W3C home > Mailing lists > Public > www-validator@w3.org > July 2002

<h1> within <p>

From: Richard Caylor <richardc@transition.com>
Date: Thu, 18 Jul 2002 11:54:45 -0400 (EDT)
Message-ID: <3D36E4DC.9000907@transition.com>
To: www-validator@w3.org

I did something like this in my html:


and the validator complains as follows:

   Error: end tag for element "P" which is not open; try removing the
   end tag or check for improper nesting of elements

This, of course, validates cleanly:


If <h1> is allowed within <p>, there's a bug in the validator.

If <h1> is not allowed within <p>, then shouldn't the validator say so 
(when it encounters the <h1>) rather than silently ending the <p> and 
leaving the user to wonder what happened? If I were an HTML guru, I 
probably wouldn't need to bother with the validator. It took me quite a 
while to boil it down to a few tags and figure out what it was 
complaining about.

- Richard
Received on Thursday, 18 July 2002 12:44:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:58:28 UTC