CSS letter-spacing

The letter-spacing property in CSS is used to control the amount of space between characters in a text. It can be used to increase or decrease the spacing between letters, helping to adjust the visual appearance of the text.

The letter-spacing property accepts both positive and negative values to increase or decrease the space between letters. The default value is normal, which specifies the normal space between characters.

Let's see some examples of how to use the letter-spacing property in CSS:

Result:

    <style>
      p {
        letter-spacing: 2px;
      }
    </style>

    <p>Hello World</p>
  

Hello World

Result:

    <style>
      p {
        letter-spacing: -1px;
      }
    </style>

    <p>CSS letter-spacing</p>
  

CSS letter-spacing

In the examples above, we used the letter-spacing property to adjust the spacing between characters in the text. The value specified determines the amount of space added or removed between letters.