CSS Typography Word Spacing


Example

The word-spacing property specifies the spacing behavior between tags and words.

Possible values

  • a positive or negative length (using em px vh cm etc.) or percentage (using %)
  • the keyword normal uses the font's default word spacing
  • the keyword inherit takes the value from the parent element

CSS

.normal    { word-spacing: normal; }
.narrow    { word-spacing: -3px; }
.extensive { word-spacing: 10px; }

HTML

<p>
  <span class="normal">This is an example, showing the effect of "word-spacing".</span><br>
  <span class="narrow">This is an example, showing the effect of "word-spacing".</span><br>
  <span class="extensive">This is an example, showing the effect of "word-spacing".</span><br>
</p>

Online-Demo

Try it yourself

Further reading: