MDN may have intermittent access issues April 18 13:00 - April 19 01:00 UTC. See for all notifications.


Revision 24552 of word-spacing

  • Revision slug: CSS/word-spacing
  • Revision title: word-spacing
  • Revision id: 24552
  • Created:
  • Creator: syssgx
  • Is current revision? No
  • Comment 31 words added, 2 words removed

Revision Content

{{ CSSRef() }}


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

  • {{ Xref_cssinitial() }}: {{ Cssxref("normal") }}
  • Applies to: all elements
  • {{ Xref_cssinherited() }}: yes
  • Percentages: n/a
  • Media: {{ Xref_cssvisual() }}
  • {{ Xref_csscomputed() }}: for normal the value 0; otherwise the absolute length


word-spacing:  normal | <length>


The normal inter-word space, as defined by the current font and/or the UA.
See {{ Xref_csslength() }} value for possible units.


The following css code:

#mozdiv1 {
    word-spacing: 15px;

#mozdiv2 {
    word-spacing: 5em;

will style two div tags containing text as shown here:



Browser compatibility

Browser Lowest Version
Internet Explorer 6.0
Firefox (Gecko) 1.0 (1.0)
Opera 3.5
Safari (WebKit) 1.0 (85)

See also

{{ CSS_Reference:Text() }}

{{ languages( {"pl": "pl/CSS/word-spacing", "fr": "fr/CSS/word-spacing" } ) }}

Revision Source

<p>{{ CSSRef() }}</p>
<h3 name="Summary">Summary</h3>
<p>The<code> word-spacing </code>CSS property specifies spacing behavior between tags and words.</p>
<ul> <li>{{ Xref_cssinitial() }}: {{ Cssxref("normal") }}</li> <li>Applies to: all elements</li> <li>{{ Xref_cssinherited() }}: yes</li> <li>Percentages: n/a</li> <li>Media: {{ Xref_cssvisual() }}</li> <li>{{ Xref_csscomputed() }}: for<code> normal </code>the value<code> 0</code>; otherwise the absolute length</li>
<h3 name="Syntax"><br> Syntax</h3>
<pre class="eval">word-spacing:  normal | &lt;length&gt;
<h3 name="Values">Values</h3>
<dl> <dt>normal </dt> <dd>The normal inter-word space, as defined by the current font and/or the UA.</dd> <dt>&lt;length&gt; </dt> <dd>See {{ Xref_csslength() }} value for possible units.</dd>
<h3 name="Examples"><br> Examples</h3>
<p>The following css code:</p>
<pre class="brush: css"><span class="css-identifier">#mozdiv1 </span><span class="css-punctuation">{</span>
<span class="whitespace">    </span><span class="css-identifier">word-spacing</span><span class="css-punctuation">: </span><span class="css-unit">15px</span><span class="css-punctuation">;</span>
<span class="css-punctuation">}</span>

<span class="css-identifier">#mozdiv2 </span><span class="css-punctuation">{</span>
<span class="whitespace">    </span><span class="css-identifier">word-spacing</span><span class="css-punctuation">: </span><span class="css-unit">5em</span><span class="css-punctuation">;</span>
<span class="css-punctuation">}</span>
<p><span class="css-punctuation">will style two div tags containing text as shown here:</span></p>
<p><img alt="example.png" class="internal default" src="/@api/deki/files/6103/=example.png"></p>
<h3 name="Specifications"><br> Specifications</h3>
<ul> <li><a class="external" href="">CSS 2.1 Text #word-spacing</a></li>
<h3 name="Browser_compatibility"><br> Browser compatibility</h3>
<table class="standard-table"> <tbody> <tr> <th>Browser</th> <th>Lowest Version</th> </tr> <tr> <td>Internet Explorer</td> <td><strong>6.0</strong></td> </tr> <tr> <td>Firefox (Gecko)</td> <td><strong>1.0</strong> (1.0)</td> </tr> <tr> <td>Opera</td> <td><strong>3.5</strong></td> </tr> <tr> <td>Safari (WebKit)</td> <td><strong>1.0</strong> (85)</td> </tr> </tbody>
<h3>See also</h3>
<p>{{ CSS_Reference:Text() }}</p>
<p>{{ languages( {"pl": "pl/CSS/word-spacing", "fr": "fr/CSS/word-spacing" } ) }}</p>
Revert to this revision