Expected result is the second line should be bold:
it's regular
it's bold
I have this code and I want to separate the tag. The html output is : the "it's bold" is outside the . Is it possible to separate the html tag using multiple innerHTML?
var content = document.getElementById("content");
content.innerHTML += "it's regular";
content.innerHTML += "<br><b>";
content.innerHTML += "it's bold";
content.innerHTML += "</b>";
<div id="content"></div>
content.innerHTML = ''; as 2nd line in your code