How to create a new line in web browser with java script ?there is only created a space with \n in browser. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to create a new line in web browser with java script ?there is only created a space with \n in browser.

5th Jan 2018, 1:07 PM
Nitesh Bhootra
Nitesh Bhootra - avatar
2 Answers
+ 3
You can use tags like <br> inside the document.write() function. Eg : document.write("Hello<br>World"); Secondly, please remove the C++ tag as it is misleading for the community.
5th Jan 2018, 1:12 PM
Kinshuk Vasisht
Kinshuk Vasisht - avatar
0
thanks
5th Jan 2018, 1:14 PM
Nitesh Bhootra
Nitesh Bhootra - avatar