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

Re: <h1> within <p>

From: Jim Ley <jim@jibbering.com>
Date: Thu, 18 Jul 2002 16:55:47 -0000
Message-ID: <026b01c22e7b$f6de15c0$ca969dc3@emedia.co.uk>
To: <www-validator@w3.org>

"Richard Caylor" <richardc@transition.com>

> 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?

The closing P tag is optional though, so even though it's not in your
markup- the validator sees it by the rules of HTML.

<h1> ... </h1>

The validator's message does include
"try removing the end tag or check for improper nesting of elements "
to warn you about the nesting.

The current development validator does give you a link to a page which

"A subtle variation of this is <P><H4>fake font change</H4></P>. <H4>'s
aren't allowed inside <P>'s, but since HTML allows you to omit the </P>
end tag for paragraphs, the validator assumes that you meant
<P></P><H4>fake font change</H4></P>, in which case the final </P> is
indeed superfluous. "

So hopefully it will be less of a problem in future.

Received on Thursday, 18 July 2002 13:02:47 UTC

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