![]() |
|
The letter-spacing property sets the amount of white space between letters. This affects the kerning and tracking. Kerning shifts letters closer together (or further apart) to make the text look better. For example, "fi" and "To" If these characters line up side-by-side, the white space between them looks odd. If you shift "fi" further apart or "To" closer together, they look better. Or so I'm told. Tracking is the overall spacing between all the letters in a line. Tight tracking puts the letters closer together; loose tracking spreads them out. You might want to tighten up the tracking if you are trying to squeeze text onto a single line; if you are trying to fill a line, use looser tracking. For example: h2 {letter-spacing: 2pt;} h2 {letter-spacing: -2pt;} Here’s what it can look like:
You can specify letter spacing in millimetres, centimetres, inches, points, picas, pixels, the height of the font (em) or the height of the letter x (ex). Enter a negative value to decrease spacing. The browser decides which algorithm to use to set the spacing. You’ll also probably find that the spacing is different if you right-justify the text. Enter a value of zero to stop this happening. |
More information letter-spacing |