Difference between innerHTML and innerText

The innerText attribute

Set or return the text content as plain text for the specified node and all its children						    						

InnerHTML attribute
Gets and sets the plain text or HTML content in the element
InnerHTML properties are different:

Allows you to use HTML formatted text and does not automatically encode and decode the text.

Read More: