+ 1
How to make newline with "\n" in html and not with "br" tag?
2 Réponses
+ 3
You can't. Browsers ignore whitespace so toss them.
0
The \n character is used to find a newline character.
Can be done in JavaScript as in the example:
var str = "Visit sololearn.\nLearn Javascript.";
alert(str);
result:
Visit sololearn
Learn Javascript.
all browser support