W3C home > Mailing lists > Public > www-validator@w3.org > August 2014

[VE][79] Horizontal Rule <hr> Tags Break Paragraphs

From: Pluto is a Planet <d_2100@hotmail.com>
Date: Fri, 15 Aug 2014 23:57:48 +0000
Message-ID: <COL402-EAS352A16BED2C6327614D071DF7D60@phx.gbl>
To: "www-validator@w3.org" <www-validator@w3.org>
Error [79]: "end tag for element X which is not open"



Here’s an example, which validates the same way in Firefox, the W3C Validator (in 4.0.1 and 5), and in jsfiddle: http://jsfiddle.net/Lraps5oy/



While the reference states that any flow elements are permitted as parents (including the <p> tag), the <hr> tag breaks a paragraph it’s contained in so that it’s considered the end tag of a <p> tag. If you do have a closing </p> tag or text content after an <hr> tag, it’ll be considered an error.


One of the details mentioned with this error is that it can be caused “by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case),” which seems to make sense, except there is no error in validating the <hr> tag (nor should there be based on the specification).


Pluto
Received on Saturday, 16 August 2014 22:13:33 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:18:11 UTC