CSS/Properties/word-spacing

From W3C Wiki
< CSS‎ | Properties
Revision as of 18:01, 16 June 2011 by Hiroki (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

word-spacing

The word-spacing property specifies spacing behavior between words.

Description

Values normal | <length> | inherit
Initial value normal
Applies to All elements
Inherited Yes


Values

  • normal
    The normal inter-word space, as defined by the current font and/or the User Agent.


  • <length>
    This value indicates inter-word space in addition to the default space between words. Values may be negative, but there may be implementation-specific limits.


  • inherit
    Takes the same specified value as the property for the element's parent.


Example

Example A

[style.css]

p#no{ word-spacing: normal; }
p#px{ word-spacing: 2px; }

[index.html]

<body>
  <p id="no">This is a paragraph(normal)</p>
  <p id="px">This is a paragraph(2px)</p>
</body>

Csslist2 word-spacing.png

CSS Reference

The CSS specification defines the word-spacing property in 16.4 Letter and word spacing.