soulless
soulless

Reputation: 17

Adding new lines in HTML

So I'm trying to add text inside a variable and the variable together. But every time I add new text I want it to be added on another line. So when it's spread on multiple lines instead of it being just on one line.

Here is the code I have for it so far. How do I put the old sResults on the lower lines?

sResults = ("You Are The Boss" + sResults)

I've tried using <p> in it but I don't think I'm implementing it right. I tried using \n like in AS3 but that's not working and also <tr> like for tables but I'm still pretty new to HTML and i have no idea.

Upvotes: 2

Views: 98

Answers (2)

Butani Vijay
Butani Vijay

Reputation: 4239

if you are using javascript then try this way :

sResults = ("You Are The Boss" + sResults)
sResult=sResult+"<br>";

Upvotes: 1

chooban
chooban

Reputation: 9256

To force a new line in HTML then you need to use the br tag.

Upvotes: 0

Related Questions