How to create a line break with JavaScript?

JavascriptWeb DevelopmentFront End Technology

To create a line break in JavaScript, use “<br>”. With this, we can add more than one line break also.

Example

Let’s see it in the below example:

<html>
   <body>
      <script>
         <!--
            document.write("Hello World!");
            document.write("<br>");
            document.write("Demo<br><br>Text!");
          //-->
      </script>
   </body>
</html>
raja
Published on 09-Jan-2018 09:44:24
Advertisements