Why doesn’t JavaScript newlines work inside HTML?

I have the following: document.write(‘HellonWorld’) As you …