W3C home > Mailing lists > Public > www-validator@w3.org > January 2017

Re: Bug within the validation of the <p> elements

From: Philip Taylor <P.Taylor@Rhul.Ac.Uk>
Date: Mon, 30 Jan 2017 11:18:41 +0000
To: Johanna Raupe <jmraupe57@yahoo.com>, "www-validator@w3.org" <www-validator@w3.org>
Message-ID: <e3e7a6e0-1bca-6511-c98f-999f53fc9968@Rhul.Ac.Uk>


On 27/01/2017 17:11, Johanna Raupe wrote:

> If you create a <div> </div> within the <p></p> elements, the
> validator replies that there is a closing </p> without an opening
> <p>.  Instead it should indicate a <div></div> is not allowed within
> the <p></p> elements..

"Should" is very much a matter of personal perspective.  What happens in reality is that the opening <div> tag tacitly closes the the current <p> element; the </div> tag closes the <div> element; and the </p> tag, when encountered, thus has no open <p> element to close.  Thus the diagnostic is correct, if confusing.

Philip Taylor
Received on Monday, 30 January 2017 11:19:48 UTC

This archive was generated by hypermail 2.3.1 : Monday, 30 January 2017 11:19:54 UTC