Skip to main content
Transform your testing process with: Company-wide Licences, Test Observability & App Percy
No Result Found

Invalid HTML

Issues related to changes in page structure in your snapshots during the visual testing process.

If you observe changes in the page structure in your snapshots it’s likely because there is invalid HTML present in the DOM snapshot. For example, placing a <div> inside of a <button> element is not valid HTML. When a browser re-renders an HTML page with invalid DOM, the browser will correct it.

The only solution is to ensure that you create valid HTML that adheres to the specifications. It’s important to note that Percy does not correct the invalid HTML; rather, it’s the browser(s) that handle this correction.

Reference Topic

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback!

Talk to an Expert
Download Copy Check Circle