Reputation: 2447
I have the following: http://jsfiddle.net/mVs9T/13/
Could someone please tell me why the output is printing
<br>
instead of:
<br/>
like here: http://f.imgtmp.com/Xjoq3.png
Upvotes: 4
Views: 511
Reputation: 5226
We added alert(txt);
and it gave us <br/>
- looks good to go.
Upvotes: 1
Reputation: 7722
Yes, because that is how chrome interprets the <br />
tag. It's just aesthetic; you need not worry about it.
Upvotes: 3
Reputation: 721
Since nothing can go between a <br>
tag the />
part is not necessary. This is probably why the browser doesn't display it.
Upvotes: 0