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

CSS text-shadow property

CSS text-shadow property Bad Practice
CSS text-shadow property Best Practice

CSS allows you to make your text more interesting by adding shadows. You can define what type of shadow you want with the text-shadow property.

Each shadow can have up to 4 values:

  • Horizontal offset (required)
  • Vertical offset (required)
  • Blur radius
  • Color

In the example above, the heading has a light purple shadow with an 8px radius, an 8px vertical offset, and a 0px horizontal offset.

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