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

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