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?

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

Build modern and responsive webpages

Responsive Typography

Build modern and responsive webpages Try Front-end

Responsive web design helps your site maintain its design integrity on a variety of screen sizes, but how does it affect your typography? With this practical book, graphic designers, web designers, and front-end developers alike will learn the nuts and bolts of how to get the best appearance from type without sacrificing performance on any device.

$ Check price
24.9924.99Amazon 4.5 logo(3+ reviews)

More Front-end resources

Ad