CSS/Properties/letter-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

letter-spacing

The letter-spacing property specifies spacing behavior between text characters.

Description

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


Values

  • normal
    The spacing is the normal spacing for the current font. This value allows the user agent to alter the space between characters in order to justify text.


  • <length>
    This value indicates inter-character space in addition to the default space between characters. 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{ letter-spacing: normal; }
p#px{ letter-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 letter-spacing.png

CSS Reference

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