Skip to content
Related Articles

Related Articles

How to add shadow to text using CSS ?

View Discussion
Improve Article
Save Article
  • Last Updated : 15 Sep, 2020

The approach of this article is to add a shadow using text-shadow property in CSS. This property accepts a list of a comma-separated list of shadows to be applied to the text. The default value of the text-shadow property is “none”.


text-shadow: h-shadow v-shadow blur-radius color|none|initial|



<!DOCTYPE html>
        h1 {
            text-shadow: 4px 4px green;
        h2 {
            text-shadow: 2px 3px blue;
<body style="text-align:center;">
        How to apply shadow effects
        to text using CSS?


Supported Browsers:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari
My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!