The following code prints
This should print(b)This should print(/b)This should print
No, a text node will not print any HTML. Instead, create an element, or use a document fragment to insert HTML in that way.
function boldHTML() {
var element = document.createElement("b");
element.innerHTML = "Bold text";
return element;
}
document.body.appendChild(boldHTML());
will print Bold text.