I need to append a html file inside a div.
While doing jquery html(), it is removing the html & body tags.
How to retain those tags?
Refer this snippet:
$('.html-file').html('<html><p>Hello</p></html>'); //it is removing html tag
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="html-file">
</div>
<html>tag agian. This should only be added once.text()is what you need