Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<h1>The Document Object</h1>
<h2>The write() Method</h2>
<p>If you want new lines in HTML, you must use paragraphs or br tags:</p>
<script>
document.write("<p>Hello World!</p>");
document.write("<p>Have a nice day!</p>");
</script>
</body>
</html>