The Experience Editor might stop working correctly and not allow editing item fields on the content pages that generate invalid HTML markup.
A few examples of such markup:
<p>My <p>text</p> which gives trouble</p>
<p>This is a text block <div>but this one is a container</div></p>
<div><p>Lots of data included here</p><div>But the outer div is not closed</div>
To resolve such issues, you must avoid using styling tags in nested components and invalid HTML markup overall. To ensure that Sitecore items generate valid HTML markup, use HTML validation in Microsoft Visual Studio or W3C Markup Validation Service.