title: how to assign a block of html code to a javascript variable
body: <p>what is the syntax to store a block of html code to a javascript variable?</p>
  
  <pre><code>&lt;div class='saved' &gt;
  &lt;div &gt;test.test&lt;/div&gt; &lt;div class='remove'&gt;[Remove]&lt;/div&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I want to assign the above code to a variable 'test' </p>
  
  <pre><code>var test = "&lt;div class='saved' &gt;
  &lt;div &gt;test.test&lt;/div&gt; &lt;div class='remove'&gt;[Remove]&lt;/div&gt;&lt;/div&gt;";
  </code></pre>
  
  <p>but it does not work, which are the correct syntax for assigning the code?</p>
  
  <p>TIA</p>