word-spacing

Description

word-spacing defines the amount of whitespace between words in an element.

ItemValue
Initial value normal
Inherited Yes
Version CSS1
JavaScript syntax object.style.wordSpacing="5px"
Applies to All elements.

Syntax and Property Values


 word-spacing: length  | normal | inherit 

The property values are listed in the following table.

ValueDescription
normal Default value. Use normal space between words.
length space in px, pt, cm, em, etc. Negative values are allowed
inherit Inherit the word-spacing property from the parent element

Example


<!DOCTYPE HTML>
<html>
    <head>
        <style>
      p {<!--from w ww.j  a v a 2  s.  c  om-->
          word-spacing: -5px;
      }
        </style>
    </head>
    <body>
    <p>
        a negative value.
    </p>
    </body>
</html>

Click to view the demo

The code above generates the following result.

word-spacing




















Home »
  HTML CSS »
    HTML CSS Reference »




HTML Tag Reference
CSS Reference
CSS Selector Reference
Encoding Reference