Создайте атрибут для HTML с JavaScript
document.getElementsByTagName("H1")[0].setAttribute("class", "democlass");
Poor Puffin
document.getElementsByTagName("H1")[0].setAttribute("class", "democlass");
// Here's what you do for the style attribute
span.setAttribute("style", "width:110%;float:center;left-margin:-10px;top-margin:-10;");