Example 1 — Length Value
Add a fixed amount of extra space between words.
<style>
p {
word-spacing: 0.4em;
}
</style>
<p>The quick brown fox jumps over the lazy dog.</p> How It Works
- Target the paragraph. The rule applies to the text element (or inherits from a parent).
- Set a length.
0.4emadds extra space relative to the current font size. - Extra, not total. The browser still uses the font’s normal word gap, then adds your value.
- Units matter.
emscales with font size;pxstays fixed.

