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!

Aching back from coding all day?

Inversion Therapy Table

Aching back from coding all day? Try Back Problems

Stretch out your back and relieve your back muscles with inversion therapy. This device counteracts the forces of gravity on the body by decompressing and elongating the spine. By using this product just ten minutes a day, you can be well on your way to improved circulation and posture while relieving muscle aches, back pain and stress.

$$ Check price
119.98119.98Amazon 4.5 logo(1,700+ reviews)

More Back Problems resources

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

Ad