Javascript DOM HTML Document write() Method write html new line tag

Introduction

Write some text directly to the HTML document, with a new line after each statement (using <br>):

View in separate window

<!DOCTYPE html>
<html>
<body>

<script>
document.write("Hello World! <br>");
document.write("Have a nice day!");
</script>/*from   w w  w  .j a  va  2  s .c  o  m*/

</body>
</html>



PreviousNext

Related