Why does a stray HTML </p> end tag generate an empty paragraph?

JavascriptWeb DevelopmentFront End Scripts

The official HTML documentation states that you need to create a <p> element if the closing p i.e. </p> cannot be matched with existing </p> tag.

The HTML4 DTD states that the end tag </p> is optional for the p element, but the start tag <p> is required.

However, the SGML declaration for HTML4 states that OMITTAG is YES that means the start tag can be implied.

Published on 06-Apr-2018 07:12:37