CSS text-shadow Property


The text-shadow CSS property applies one or more text shadow effects to the text content of an element. Each text shadow effect must specify a shadow offset and may optionally specify a blur radius and a shadow color.

As its name implies, this CSS property adds shadows to the text. It accepts the comma-separated list of shadows that applied to the text. It's default property is none. It applies one or more than one text-shadow effect on the element's text content.

Values

h-shadow: It is the required value. It specifies the position of the horizontal shadow and allows negative values.

v-shadow: It is also the required value that specifies the position of the vertical shadow. It does not allow negative values.

blur-radius: It is the blur-radius, which is an optional value. Its default value is 0.

color: It is the color of the shadow and also an optional value.

none: It is the default value, which means no shadow.

initial: It is used to set the property to its default value.

inherit: It simply inherits the property from its parent element.

CSS Syntax

text-shadow: h-shadow v-shadow blur-radius color|none|initial|inherit;

Example -