我有一段文字看起来像这样:
<p> We recently reduced the number of savings accounts we offer. I welcomed this because I think
members find it confusing to look through tables of lots of slightly different accounts, all
with advantages and disadvantages. I think it affects their trust in us. But I don’t understand
why we haven’t applied this to children’s accounts of all things. Since children don’t pay tax,
why do they need an ISA as well as a children’s savings account? Children (and their parents)
are the last people we want to confuse as they could be customers for life. And why is our
children’s savings account called the ‘Smart Limited Access’? It doesn’t strike me as being very
self-explanatory or child friendly. How about just ‘Nationwide Young Saver Account’?
I’d be grateful if you could clear this up for me.
Best regards,
Vanessa</p>
但是,当它被放入 html 时,它会忽略此布局并使其只有一行。我怎样才能保留它的原始文本
最佳答案
使用 <pre>
那不是<p>
标签以保持格式相同。
<pre>Now
Line endings
Are conserved !</pre>
关于javascript - 文本没有显示它应该如何在 html 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26219855/