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

This is (technically) correct - even if it's bad behaviour on part of 
the developers.

Closing tags are optional, therefore the opening of the <div> implies a 
closing of the <p> (both being block-level elements) - which therefore 
leaves a dangling </p> with no opened <p> on the validators stack.

See 
https://www.w3.org/TR/1998/REC-html40-19980424/intro/sgmltut.html#h-3.2.1


On 27/01/17 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..

-- 
Ian Stuart.
Bibliographics and Multimedia Service Delivery team,
EDINA,
The University of Edinburgh.

http://edina.ac.uk/

The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

Received on Monday, 30 January 2017 09:03:54 UTC