i would like to ask how i can work with html tags e.g. <h1> or <b> in JavaScript?
My Code :
document.addEventListener('DOMContentLoaded', function() {
if (window.location.href.indexOf("/login?from=") !== -1) {
var hint=document.createTextNode("<b>Hello</b>");
var node = document.getElementById("main-panel");
node.insertBefore(hint, node.firstChild);
}
})
But they show the text string <b> hello </b> and does not make it big .
i can only work in a js file i dont have the opportunities to work with div tags in html file