06. Decorating Text text-decoration, text-shadow

Let's now discuss the two ways in which we can decorate our text.

Lines under, over, and through our text

We can apply decorations to our text with the text-decoration property. The values include: none, underline, overline, and line-through.

We can take this a step further and add color the line with the text-decoration-color property.

p {
  text-decoration: underline;
  text-decoration-color: pink;

Hello Venus!

Adding a Drop Shadow

To add a drop shadow behind your text, we can use the text-shadow property.

p {
  text-shadow: 3px 3px 1px blue;

The property takes three lengths and a color:

  1. The first length tells how far to the left/right the shadow should fall.
  2. The second length is the distance to the top or bottom that the shadow should fall.
  3. The third length is optional, and specifies the amount of blur that should be applied.
  4. Lastly, you may choose the color of the drop shadow with the fourth value.

Hello World!

Build modern and responsive webpages

High Performance Web Sites

Build modern and responsive webpages Try Front-end

Want your web site to display more quickly? This book presents 14 specific rules that will cut 25% to 50% off response time when users request a page. Author Steve Souders, in his job as Chief Performance Yahoo!, collected these best practices while optimizing some of the most-visited pages on the Web.

$ Check price
29.9929.99Amazon 4.5 logo(63+ reviews)

More Front-end resources

Aching back from coding all day?

Acupressure Mat & Pillow

Aching back from coding all day? Try Back Problems

Relieve your stress, back, neck and sciatic pain through 1,782 acupuncture points for immediate neck pain relief. Made for lower, upper and mid chronic back pain treatment, and improves circulation, sleep, digestion and quality of life.

$$ Check price
144.87144.87Amazon 4.5 logo(1,890+ reviews)

More Back Problems resources