title: print html tags in javascript
body: <p>Thanks for reading!</p>
  
  <pre><code>var data = "&lt;html&gt;&lt;head&gt;&lt;title&gt;Hello&lt;/title&gt;&lt;/head&gt;&lt;body&gt;Hello Body&lt;/body&gt;&lt;/html&gt;";
  </code></pre>
  
  <p>I want to print <code>data</code> including the HTML tags without having the browser rendering the HTML tags and just displaying "Hello Body". </p>
  
  <p>I tried:</p>
  
  <p><code> 
  str = str.replace("&lt;", "");
  </code></p>
  
  <p>but in vain.</p>