Answers for "html carriage return in string"

0

html text content new line

//setting this css style solving problem with new line in textContent
h1.setAttribute('style', 'white-space: pre;');

//add \r\n in text everywhere You want for line-break (new line)
h1.textContent = "this is line one  \r\n and this is line 2";
Posted by: Guest on September-22-2020
0

<br>

<br></br>
Posted by: Guest on March-26-2020

Code answers related to "html carriage return in string"

Browse Popular Code Answers by Language