CSS PROPERTIES
Expand All|Collapse All
CSS AT-RULES
SPONSORED LINKS

CSS word-spacing Property

Topic: CSS3 Properties Reference« Prev|Next »

Description

The word-spacing CSS property sets the spacing between the words in the text content.

The following table summarizes the usages context and the version history of this property.

Default value: normal
Applies to: All elements. It also applies to ::first-line.
Inherited: yes
Animatable: Yes. See animatable properties.
Version: CSS 1, 2, 3

Syntax

The syntax of the property is given with:

word-spacing length | normal | initial | inherit

The example below shows the word-spacing property in action.

  • p {
  •     word-spacing: 50px;
  • }

Property Values

The following table describes the values of this property.

Value Description
length Specifies the extra spacing between words as a length value in px, pt, cm, em, etc. Negative length values are allowed.
normal Specifies the normal word spacing, as defined by the current font and/or the browser. This is default value.
initial Sets this property to its default value.
inherit If specified, the associated element takes the computed value of its parent element word-spacing property.

Browser Compatibility

The word-spacing property is supported in all major modern browsers.

Browsers Icon

Basic Support—

  • Firefox 1+
  • Google Chrome 1+
  • Internet Explorer 4+
  • Apple Safari 1+
  • Opera 4+

Further Reading

See tutorial on: HTML Text Formatting.

Related properties: letter-spacing, white-space.

 
Close

Your Feedback:

 

We would love to hear from you! Please say something.