+ 1

How to insert a new line on a output element?

I have an <output> element on my page, my JavaScript generates an string and I use this string as new output.value, but I can't insert line breaks on the string, I tried \n, \10, <br> and none of these worked. Any other way of inserting a new line on a string to be shown in an output element?

1st Mar 2019, 8:09 AM
Chaves Dias Jr.
Chaves Dias Jr. - avatar
1 Answer
+ 8
perhaps the <output> element does not allow multiple lines, try tweaking its CSS.
1st Mar 2019, 8:14 AM
Valen.H. ~
Valen.H. ~ - avatar