letter-spacing & word-spacing
Letter-spacing controls spacing between letters. Word-spacing controls spacing between words. Both help adjust text readability and visual impact.
Letter Spacing
CSS
/* Letter spacing values */
.normal {
letter-spacing: normal;
/* Browser default spacing */
}
.tight {
letter-spacing: -0.05em;
/* Tighter spacing */
}
.loose {
letter-spacing: 0.1em;
/* Looser spacing */
}
/* Pixel values */
.spaced {
letter-spacing: 2px;
/* 2px between letters */
}Word Spacing
CSS
/* Word spacing */
.normal {
word-spacing: normal;
/* Default space between words */
}
.tight {
word-spacing: -0.1em;
/* Tighter word spacing */
}
.loose {
word-spacing: 0.5em;
/* Looser word spacing */
}
/* Pixel values */
.spaced {
word-spacing: 5px;
}Practical Applications
CSS
/* Headings with letter spacing */
h1 {
letter-spacing: 0.05em;
font-size: 2rem;
font-weight: bold;
}
/* Buttons with spacing */
button {
letter-spacing: 0.1em;
text-transform: uppercase;
font-size: 12px;
}
/* Body text readable spacing */
body {
letter-spacing: 0;
word-spacing: normal;
line-height: 1.6;
}
/* Tight spacing for compact design */
.compact {
letter-spacing: -0.02em;
word-spacing: -0.05em;
}Note
Letter-spacing and word-spacing adjust text readability and visual style. Use em units for relative scaling. Small values work best for readability.
Next
Background images: [background-image](/css/background-image).