CSS Text-Shadow Property

In this chapter you will learn:
About text-shadow property
Values of this property
Example of this property

CSS text-shadow property is used to apply shadow to the text of the element so that it may look attractive and the web page also became impressive.

Values of this property-
Values Description
h-shadow Used to display horizontal shadow
v-shadow Used to display vertical shadow
color Used to specify the color of shadow
none No shadow
initial Used to specify the default
inherit Inherit from parent property

Example of this property

<html>
<head>
    <title>Example of text-shadow property</title>
    <style type="text/css">        
       #a
       {
            text-shadow: 1px 1px #00ff00;
       } 
       #b
       {
            text-shadow:1px 1px #ff0000;
       }   
            
           
    </style>
    </head>
<body>
<h1 id="a">This is the example of text-shadow property</h1>
<h1 id="b">This is the example of text-shadow property</h1>
</body>
</html>
Guide:-

When you will run the given program then you will get the shadow of heading (h1).


Output:-
example of text-shadow property
SUMMARY

In this chapter you have learned about the text-shadow property so click on Next button to know some other properties of CSS.

More Articles

 

Share your thought



PLEASE DISABLE ADBLOCKER AND SUPPORT US!

Please support us by enabling ads on this page. Refresh

YOU DON'T LIKE ADS, WE ALSO DON'T LIKE ADS!
 
But we have to show ads on our site to keep it free and updated. We have to pay huge server costs, domain costs, CDN Costs, Developer Costs, Electricity and Internet Bill. Your little contribution will encourage us to regularly update this site.