title: JavaScript: how to change CSS style of created span?
body: <pre><code>  newNode = document.createElement("span");
    newNode.innerHTML = "text";
    range.insertNode(newNode);
  </code></pre>
  
  <p>Is it possible to make the text in innerHTML with red background color?  I want to add style="background-color:red" to just created span. Is it possible? Or it must have some id, and then I can change this span with <a href="http://en.wikipedia.org/wiki/JQuery" rel="nofollow noreferrer">jQuery</a>?</p>