Categories
CSS Web development

CSS letter-spacing Property

Learn how to use the CSS letter-spacing Property.


The CSS letter-spacing property sets the space between characters in a text.

CSS letter-spacing Property

Demo:

Syntax:

letter-spacing: normal|length;

normal (default) – specifies normal space between characters.

length – specifies a length that is used as the space between characters.

Example:

<!DOCTYPE html>
<html>
<head>
<style>

.a {
  letter-spacing: normal;
}

.b {
  letter-spacing: 5px;
}

.c {
  letter-spacing: 2px;
}

.d {
  letter-spacing: -1px;
}
</style>
</head>
<body>

<h3 class="a">This is heading 3.</h3>
<h3 class="b">This is heading 3.</h3>
<h3 class="c">This is heading 3.</h3>
<h3 class="d">This is heading 3.</h3>

</body>
</html>

Output:

This is heading 3.

This is heading 3.

This is heading 3.

This is heading 3.


Enjoy coding!

Read also:

CSS margin Property

CSS mix-blend-mode Property

CSS position Property