How to implement a line break in Javascript/HTML

Asked

Viewed 49 times

0

I am programming in Javascript inside the HTML and wanted to know where I would add the line break br along those lines?

document.write('Seu nome em maiúsculo é ' + nome.toUpperCase())

For I get after having the name of the person in uppercase displayed, make another document.write, but at the bottom line.

  • 5

    Document.write('Your name in upper case is ' + name.toUpperCase() + '<br>') does not work?

1 answer

0


Try to use:

Document.write('Your name in capital letters is \n' + name.toUpperCase())

It is possible to replace the \n for br (between tags).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.