There are two types of spacing properties in CSS.
The letter-spacing defines the spacing between the characters of a block of text.
p{ letter-spacing: 3px; }
<!doctype html>
<html>
<head>
<title>...</title>
</head>
<body>
<p style="letter-spacing: 3px;">You can learn programming languages from PHPDocs.</p>
</body>
</html>
The word-spacing defines the length of space between words and tags.
p{ word-spacing: 3px; }
<!doctype html>
<html>
<head>
<title>...</title>
</head>
<body>
<p style="word-spacing: 3px;">You can learn programming languages from PHPDocs.</p>
</body>
</html>
The possible units can be used for these properties are as follows:
Values | Description |
---|---|
pixel | Values with “px” e.g. 3px, 4px |
rem | Values with “rem” e.g. 1rem, 6rem |
normal | It alters the space between characters in order to justify text. |