代码示例:(标识:cssref_default_pre)
<!DOCTYPE html>
<html>
<head>
<style>
/* 默认的 CSS 值 */
pre {
  display: block;
  font-family: monospace;
  white-space: pre;
  margin: 1em 0;
}
</style>
</head>
<body>

<p>默认情况下,pre 元素会这样显示:</p>

<pre>
Text in a pre element
is displayed in a fixed-width
font, and it preserves
both    spaces and
line breaks
</pre>

<p>自定义的 pre 元素(更改 white-space):</p>

<pre style="white-space:nowrap;">
Text in a pre element
is displayed in a fixed-width
font, and it preserves
both    spaces and
line breaks
</pre>

</body>
</html>
运行结果: