CSS Text Shadow Property


The text-shadow property is used to set the text shadow around a text.

Syntax

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

The text-shadow property attaches one or more shadows to text. The property is a comma-separated list of shadows, each specified by 2 or 3 length values and an optional color. Omitted lengths are 0.

Value Description
h-shadow Required. The position of the horizontal shadow. Negative values are allowed
v-shadow Required. The position of the vertical shadow. Negative values are allowed
blur Optional. The blur distance
color Optional. The color of the shadow. Look at CSS Color Values for a complete list of possible color values
none Default value. No shadow
initial Sets this property to its default value.
inherit Inherits this property from its parent element.

Example

 <!DOCTYPE html>
   <html>
    <head>
    <style type="text/css">
     b{
      text-shadow:10px 10px 5px #000000;
      }
    </style>
    </head>
    <body>
    <p>Welcome to CSS Tutroial</p> 
    </body>
   </html>
Output

Welcome to CSS Tutroial


Share this article on