title: Create string from HTMLDivElement
body: <p>What I would like to be able to do is create a string from a Javascript HTMLElement Object. For example:</p>
  
  <pre><code>var day = document.createElement("div");
  day.className = "day";
  day.textContent = "Random Text";
  </code></pre>
  
  <p>Now we have create the <code>day</code> HTMLDivElement Object is it possible to make it print as a string? e.g.</p>
  
  <pre><code>&lt;div class="day"&gt;Random Text&lt;/div&gt;
  </code></pre>