title: Before, not replace
body: <p>Trying to figure out how should I put a span before my_div_class and not to replace all of it. Now it replaces the div, but I don't want to do it. I assume it's something like :before but have no idea how to use it.</p>
  
  <pre><code>&lt;script&gt;
   {
    var x = document.getElementsByClassName("my_div_class");
    x[0].innerHTML = "&lt;span style='color:#ff0000;'&gt;Hello World!&lt;span&gt;";
   }
  &lt;/script&gt;
  </code></pre>