changing line | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

changing line

how to change line in j.s

27th Jun 2016, 10:04 AM
Syed Taha
Syed Taha - avatar
3 Answers
+ 5
If you want to print a text in HTML page, using javascript; you have two options. First one is to use document.writeln and second to use something like.. document.write("text <br>")..
28th Jun 2016, 6:21 PM
Shraddha -
Shraddha - - avatar
0
you can embed an HTML tag within your string like <br>. note that if you use any block element like P or h1, h2.... etc, it should break line automatically (usually unless you play with that in your css)
22nd Jul 2016, 2:29 PM
Dr.Na'el Hariri
Dr.Na'el Hariri - avatar
0
oh, i forgot. you can also use \n
22nd Jul 2016, 3:03 PM
Dr.Na'el Hariri
Dr.Na'el Hariri - avatar