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

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

From: Ian Stuart <Ian.Stuart@ed.ac.uk>
Date: Mon, 30 Jan 2017 09:02:53 +0000
To: <www-validator@w3.org>
Message-ID: <3d00c676-5122-07bf-c8b5-1a6cd0ba5272@ed.ac.uk>
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

This archive was generated by hypermail 2.3.1 : Monday, 30 January 2017 09:03:57 UTC