<script> var html = '<div>' + '<p>Some text<\/p>' + '<p class="test">Some text<\/p>' + '<\/div>'; document.write(html) var html = '<div>\ <p>Some text<\/p>\ <p class="test">Some text<\/p>\ <\/div>'; document.write(html) </script>