HTML Element Style How to - Add text shadow








Question

We would like to know how to add text shadow.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
body {<!-- ww w.  j  a  v a2 s  . c  o m-->
  background: #6299ec;
  font-family: 'Arial';
}

h3 {
  text-shadow: 0px 2px 0px #fff;
  color: blue;
  font-size: 3em;
}
</style>
</head>
<body>
  <h3>Some text</h3>
  <h3 style="text-shadow: none">Another text</h3>
</body>
</html>

The code above is rendered as follows: