Difference between innerText and innerHTML

Ask a question+
0

What is the difference between innerHTML, innerText and childNodes[].value in JavaScript?

add comment

1 Answer

0

Unlike innerText, though, innerHTML lets you work with HTML rich text and doesn’t automatically encode and decode text. In other words, innerText retrieves and sets the content of the tag as plain text, whereas innerHTML retrieves and sets the content in HTML format.

add comment

Your Answer