Text-shadow, for all browsers

The CSS 3 standard text shading attribute and alternative for older browsers.

The shadow effect to the characters of a text exists in Internet Explorer from the version 5.5 as a filter ActiveX. It was generalized to all browsers by becoming a property of CSS 3.

Demonstration

The standard code

The text-shadow property is followed by a definition or a list of definitions separated by a comma.

You can cancel the property with the definition: text-shadow: none.

Each definition is composed of four parameters, two of which being optional.

The code of the demo:

.tshadow
{
  text-shadow: 1px 1px 2px black;
}

To surround the characters with a halo effect:

.halo
{
  text-shadow: 1px 1px 2px black, 0 0 1em gray, 0 0 0.2em gray;
}

Example:

Demonstration

The CSS code for all browsers

<style>
.tshadow
{
text-shadow: 1px 1px 2px black;
}
.halo
{
text-shadow: 1px 1px 2px black, 0 0 1em gray, 0 0 0.2em gray;
}
</style>

For accessing these properties in JavaScript ...

object.style.textShadow="1px 2px 2px gray";