<?xml version="1.0" encoding="utf-8"?>

CSS text spacing properties

CSS text spacing properties Bad Practice
CSS text spacing properties Best Practice

As an American architect Frank Lloyd Wright once said, "Space is the breath of art." In design, spacing can make or break the user experience. CSS has several properties that allow you to precisely control how much space you want to leave between characters, words, and lines.

Here are some of those text spacing properties:

  • letter-spacing specifies the space between characters
  • text-indent sets the indentation of the first line of a text
  • line-height sets the space between lines
  • word-spacing defines the space between words

Length values in px are most commonly used with these properties.

Improve your UX & Product skills with interactive courses that actually work