Little Web Hut

CSS 2.1 Reference: word-spacing Property

CSS word-spacing Property
Syntax
selector {word-spacing: value;}
  • value is specified by using a length or one of the following keywords: normal or inherit.
Usage

The word-spacing property is used to control the spacing between words. If a length value is used, then the specified length is added to the default space between words. Negative length values are permitted.

This property is specified by using a length, or a keyword, according to the syntax shown above.


CSS Example: The word-spacing property is set to 15 pixels.
  #tst1 {word-spacing: 15px;}
Test It HTML StyleTest It XHTML StyleTest It HTML5 Style

Keywords
  • normal - Specifies normal word spacing as determined by the current font and/or browser. The browser may modify the spacing to justify the text.
  • inherit - The inherit keyword is used to specify that the value for this property should be taken from the parent element. If inherit is used with the root element, then the initial value for this property will be used.
Applies To All elements
Inherited Yes
Initial Value normal


word-spacing Property Examples
Test It HTML StyleTest It HTML StyleTest It HTML5 StyleThe word-spacing property is set to 15 pixels.