Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I write a <br/> tag in JavaScript?

Tags:

javascript

How do I write a <br/> tag in JavaScript?

like image 388
Vinay Gayakwad Avatar asked Jan 26 '11 11:01

Vinay Gayakwad


People also ask

How do you BR tag in JavaScript?

To create a line break in JavaScript, use “<br>”.

How do you type a BR tag?

There are multiple correct ways to use a br tag in the web documents. In HTML, a line break is made with the <br> tag. We don't need to close <br> because it's an empty tag. To break a line, either <br/> or <br></br> are acceptable.

How do you add a br tag to an array?

To add a line break in array values for every occurrence of ~, first split the array. After splitting, add a line break i.e. <br> for each occurrence of ~. For example, This is demo text 1!~This is demo text 2!~~This is demo text 3!


1 Answers

document.write('<br/>');

this should do the trick.

like image 132
Jake Aitchison Avatar answered Oct 06 '22 20:10

Jake Aitchison