CSS text-shadow property

CSS text-shadow

CSS text-shadow is used to add shadow effect to the text.

Syntax

text-shadow: h-shadow v-shadow blur-radius color

It consists of following shorthand properties

  • h-shadow : It is required, it represent the position of the horizontal shadow. Negative values can be given.
  • v-shadow : It is required, it represent the position of the vertical shadow. Negative values can be given.
  • blur-radius : It is optional, it represent the blur radius.
  • color : It is optional, it represent the color of the shadow.

Example

Try Yourself

In the above example values used in text-shadow property are,

3px - h-shadow

6px - v-shadow

5px - blur-radius

blue - color