Each statement is executed by the browser in the sequence they are written.
This example will write a header and two paragraphs to a web page:
document.write("<h1>This is a header</h1>");
document.write("<p>This is a paragraph</p>");
document.write("<p>This is another paragraph</p>");