word-spacing property

Image Tutorials

Definition and Usage

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

  • Initialnormal
  • Applies toall elements
  • Inheritedyes
  • Percentagesrefer to the width of the affected glyph
  • Mediavisual
  • Computed Valuean optimum, minimum, and maximum value, each consisting of either an absolute length, a percentage, or the keyword normal
  • Animatableyes, as a length
  • Canonical orderthe 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

1 #mozdiv1 {
2   word-spacing15px;
3 }
4 #mozdiv2 {
5   word-spacing5em;
6 }

Compatibility

Desktop browsers

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 1.0 1.0 (1.7 or earlier) 6.0 3.5 1.0 (85)

Mobile browsers

Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support NA NA NA NA NA

Rate article