If I have a block of HTML with many tags, how do insert it in JavaScript?
var div = document.createElement(\'div\'); div.setAttribute(\'class\', \'post block
If I understand correctly, you're looking for a multi-line representation, for readability? You want something like a here-string in other languages. Javascript can come close with this:
var x = " \ \ \ some text \ \ ";
\ some text \