Set the space between characters in a <p> element to 15 pixels:
The letterSpacing property sets or returns the space between characters in a text.
Tip: To set or return the spacing between words in a text, use the wordSpacing property.
The letterSpacing property is supported in all major browsers.
Return the letterSpacing property:
Set the letterSpacing property:
Value | Description |
---|---|
normal | Normal space between characters. This is default |
length | Defines the space in length units. Negative values are allowed |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Default Value: | normal |
---|---|
Return Value: | A String, representing the space between characters in the text |
CSS Version | CSS1 |
Using negative values:
Return the letter spacing of a <p> element:
Difference between the letterSpacing property and the wordSpacing property:
CSS tutorial: CSS Text
CSS reference: letter-spacing property