CSS text-shadow is a property that allows you to add a shadow effect to the text of an HTML element. It can be used to enhance the visual appearance of text by creating a shadow behind it. The text-shadow property takes a set of values to define the offset, blur radius, and color of the shadow.
Example
h1 {
text-shadow: 2px 2px;
}
You can click on above box to edit the code and run again.
Output
Text-shadow effect!
Next, add a color (red) to the shadow:
Example
h1 {
text-shadow: 2px 2px red;
}
You can click on above box to edit the code and run again.
Output
Text-shadow effect!
Then, add a blur effect (5px) to the shadow:
Example
h1 {
text-shadowv: 2px 2px 5px red;
}
You can click on above box to edit the code and run again.