word-spacing property CSS Reference



Definition and Usage

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

  • Initial normal
  • Applies to all elements
  • Inherited yes
  • Percentages refer to the width of the affected glyph
  • Media visual
  • Computed Value an optimum, minimum, and maximum value, each consisting of either an absolute length, a percentage, or the keyword normal
  • Animatable yes, as a length
  • Canonical order the unique non-ambiguous order defined by the formal grammar

Syntax

Formal syntax: normal | <length>
word-spacing: normal    /* Keyword value */
word-spacing: 3px       /* <length> values */
word-spacing: 0.3em
word-spacing: inherit

Values

normal
The normal inter-word space, as defined by the current font and/or the browser.
<length>
See <length> value for possible units.

Examples

#mozdiv1 {
  word-spacing: 15px;
}
#mozdiv2 {
  word-spacing: 5em;
}

Compatibility

Desktop browsers

FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support1.01.0 (1.7 or earlier)6.03.51.0 (85)

Mobile browsers

FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic supportNANANANANA

Relative articles