tviana
tviana

Reputation: 417

How to force new line without html tags

I there,

Is there a way to force html don't ignore the new lines inserted by a new line key?

For example I have this:

<span>Attention to registered measurement values relating to:
Patient: Jose
Parameter(s): Ar</span>

Is there any css style or something to apply on the span? I must not use tags like br..

Thanks in advance

Upvotes: 1

Views: 2272

Answers (1)

John Conde
John Conde

Reputation: 219804

You can use tags like <pre> or <code> as appropriate for the content.

<pre>Attention to registered measurement values relating to:
Patient: Jose
Parameter(s): Ar</pre>

You also use CSS white-space: pre;:

<span style="white-space: pre;">Attention to registered measurement values relating to:
Patient: Jose
Parameter(s): Ar</span>

Upvotes: 6

Related Questions