Html-如何防止连续空格被折叠

Bar*_*ich 4 html formatting

我正在使用 html 模板以编程方式发送电子邮件。我对 html 一无所知,但我刚刚了解到它会折叠连续的空白字符,这会破坏我的格式(我正在通过电子邮件发送数字表)。我怎么解决这个问题?

Sha*_*nak 5

<pre>只需像这样使用标签:

<pre>
 This is some text   with some extra spacing    and a
 few newlines
 thrown in
 for                                              good
 measure
</pre>
Run Code Online (Sandbox Code Playgroud)

工作示例:jsFiddle和pre 标记的 良好参考。