I am trying to append the html in the DOM using innerHTML method. When </> content was inside the string html content which i want to append in DOM, It will not load in DOM. it's automatically removed.
ex:
document.getElementById("container").innerHTML = "<div></></div>";
console.log(document.getElementById("container").innerHTML);
result: "<div></div>"
I don't know why. Can anyone clarify this for me please.?
Thanks in advance.!