If I have a web page with the following text:
'This is some (a bunch of extra spaces in here) test print'.
..it will show as 'This is some test print'.
But is there a way to keep extra spaces in there without using 'nbsp;' for them?
CodePudding user response:
Either wrap your text within <pre>
tags or set the white-space
property to pre
Examples:
p {
white-space: pre;
}
<p>This is some test print</p>
<pre>This is some test print</pre>
<iframe name="sif1" sandbox="allow-forms allow-modals allow-scripts" frameborder="0"></iframe>
CodePudding user response:
There are various ways
- Using special character
Using pre tag as mentioned by @j08692
using an inline element with the desired width & height without content