What Is Innerhtml -

Innerhtml is often used to set and modify the contents of a

element.The easiest way of editing content in an html element is to use the innerhtml property.

More precisely, innerhtml gets a serialization of the nested child dom elements within the element, or sets html or xml that should be parsed to replace the dom tree within the element.The only difference between innertext and innerhtml is that:The element property innerhtml gets or sets the html or xml markup contained within the element.

If we try to explain the innerhtml simply then the work done by the innerhtml is simply to load the page content without refreshing the entire page.Not every html element supports the input.

Just the text content of the element and all its children, without css hidden text spacing and tags, except