Text Shadows

The text-shadow property adds a shadow to a block of text. Its allowed values:

  • h-shadow
  • v-shadow
  • blur
  • color

The h-shadow and v-shadow values specify the offset for the shadow. Values are expressed as lengths and negative values are allowed.

The blur value is another length value and specifies the degree of blur. The blur value is optional. The color value specifies the color of the shadow.

 
<!DOCTYPE HTML> 
<html> 
    <head> 
    <title>Example</title> 
        <style> 
            h1 { 
                text-shadow: 0.1em .1em 1px lightgrey; 
            } 
            p { 
                text-shadow: 5px 5px 20px black; 
            } 
        </style> 
    </head> 
    <body> 
        <h1>Header</h1> 
        <p> 
            HyperText Markup Language (HTML) is the main markup language for 
            displaying web pages and other information that can be displayed 
            in a web browser(From From Wikipedia, the free encyclopedia).
        </p> 
    </body> 
</html>
  
Click to view the demo
Home 
  HTML CSS Book 
    CSS  

Related: