When I try to display a string with '<' symbol in it, the part of string after the symbol gets ignored. However, when I log it in console it's displayed correctly. Here's a snippet of the issue:
console.log('display<hide');//Displays Full text
document.getElementById('somediv').innerHTML='display<hide';//Removes remaining part
<div id="somediv">
</div>
Why does this happen?
Edit:
I am aware about < and > in HTML, but my question is regarding the issue in displaying < as I had no issues displaying > with innerHTML