A different way of doing it is to put the HTML inside a script tag:
Then you can get it into Javascript using
var myHtml = document.getElementById('myHtml').innerHTML;
or using one of several libraries which help you with this. Code inside a script tag with type="text/template"
will not be interpreted or shown by the browser. The advantage of this approach over putting it straight into a string in Javascript is that it allows you to keep treating it as normal HTML in your editor, and it keeps the Javascript clean. See also this post by John Resig.