stkvtflw stkvtflw - 1 year ago 160
HTML Question

Line break in html with `\n`

I feel like i'm asking very noob question) Is there way to make html properly treat

line breaks? Or i have to replace them with

Answer Source

This is to show new line and return carriage in html, then you don't need to do it explicitly. You can do it in css by setting the white-space attribute pre-line value.

<span style="white-space: pre-line">@Model.CommentText</span>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download