How to add a newline in BS4 label output?

How do I add a line break in a character string for a label?

var firstQuote = "I love Spring and Summer."
var secondQuote = "It is so warm, sunny, and fun to be outside then."

  lblQuotes.value = firstQuote + "\n" + secondQuote  // this doesn't work

Have you tried,

<br> instead of \n

Yes - the <br /> just come through with the rest of the string.

Maybe try it with

lblQuotes.textContent or lblQuotes.innerHTML
Label1.innerHTML = firstQuote + "<br>" + secondQuote;
1 Like