Home·CSS properties

text-shadow

Text

Casts a shadow behind text — useful for white type on a busy photo.

How to write ittext-shadow: none;
Common valuesnone, 0 1px 2px rgba(0,0,0,.3)
InheritedYes — children receive it
CategoryText

How to read this

  • An inherited property only needs writing once on the parent — every child picks it up. Most text properties work this way.
  • A shorthand resets whatever you leave out. Writing background: red alone also wipes a background image you set earlier.
  • When rules collide, the more specific selector wins; only when specificity ties does source order decide.
  • Animate transform and opacity for smoothness. Changing width or top forces the layout to be recalculated.

Frequently asked questions

Q. What is the CSS text-shadow property?

Casts a shadow behind text — useful for white type on a busy photo.

Q. How do you write text-shadow?

As text-shadow: none; Common values include none, 0 1px 2px rgba(0,0,0,.3).

Q. Is text-shadow inherited?

Yes. Set it once on the parent and every child uses the same value without repeating it.

Q. What group does text-shadow belong to?

The text group.

Properties in the same group

Reference docs