title: Jquery html() function
body: <p>I need to append a html file inside a div.</p>
  
  <p>While doing jquery html(), it is removing the html &amp; body tags.</p>
  
  <p>How to retain those tags?</p>
  
  <p>Refer this snippet:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$('.html-file').html('&lt;html&gt;&lt;p&gt;Hello&lt;/p&gt;&lt;/html&gt;'); //it is removing html tag</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div class="html-file"&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>