Why does a stray HTML end tag generate an empty paragraph?


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.

Lakshmi Srinivas
Lakshmi Srinivas

Programmer / Analyst / Technician

Updated on: 30-Jul-2019

63 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements