Search notes:

CSS: white-space

Besides global values, the property white-space can be set to one of the following values:
normal
nowrap
pre
pre-wrap
pre-line
break-spaces
<!DOCTYPE html>
<html>
<head>
  <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
  <title>white-space</title>

</head>
<body>

  <code>white-space: normal</code>
  <div style="white-space: normal;border: 1px solid black;width:10em">foo     bar   baz  words are words, don't you think?
one  two    three</div>

  <br/><code>white-space: nowrap</code>
  <code>white-space: pre</code>
  <div style="white-space: pre;border: 1px solid black;width:10em">foo     bar   baz  words are words, don't you think?
one  two    three</div>


  <br/><code>white-space: nowrap</code>
  <div style="white-space: nowrap;border: 1px solid black; width:10em">foo     bar   baz  words are words, don't you think?
one  two    three</div>

  <br/><code>white-space: pre-wrap</code>
  <div style="white-space: pre-wrap;border: 1px solid black; width: 10em">foo     bar   baz  words are words, don't you think?
one  two    three</div>

  <br/><code>white-space: pre-line</code>
  <div style="white-space: pre-line;border: 1px solid black; width: 10em">foo     bar   baz  words are words, don't you think?
one  two    three</div>

  <hr>

    See also <a href='../line-breaking/prevent-line-break.html'>Prevent line breaks</a>

</body>
</html>
Github repository about-css, path: /properties/white-space.html

See also

Line breaks
CSS properties

Index