HTML Academy
The Text Shadow Color
Text Formatting7/26
Back to the list of tasks
  • 1. Unicode Characters
  • 2. The text-shadow Property
  • 3. Horizontal Text Shadow Offset
  • 4. Vertical Text Shadow Offset
  • 5. Text Shadow Feathering
  • 6. The Text Shadow Color
  • 7. Embedded Effect for Text
  • 8. Decorative Retro Shadow
  • 9. Challenge: Psychedelic Shadows
  • 10. Logo: Custom Font
  • 11. Logo: Icon Font
  • 12. Logo: Size Alignment
  • 13. Applying Decorative Styling to the Line, Step 1
  • 14. Applying Decorative Styling to the Line, Step 2
  • 15. The text-indent Property
  • 16. The: first-letter Pseudo Element
  • 17. : first-line Pseudo Element
  • 18. Column Markup: The column-count Property
  • 19. Column Markup: The column-width Property
  • 20. Column Markup: The column-gap Property
  • 21. Text Direction
  • 22. Text Direction and Tables
  • 23. Overflowing Text
  • 24. Spacing Between Words
  • 25. Challenge: Why So Serious?
  • 26. Challenge: Play With Fonts
Decorative Retro Shadow
  • Sign up
  • Log in

Loading…
Everything will be ready in few seconds

  • Theory
  • Theory
  • Comments

Embedded Effect for Text

The text can have several shadows at the same time. To do this, the shadows must be listed in a comma-separated list. In this case, the shadows are distributed according to the rule: the first shadow in the list is the topmost, and the last in the list is the lowest.

text-shadow:
  1px 1px 1px #111111,
  2px 2px 2px #222222;

You can achieve some unusual results by using multiple shadows. For example, you can add an “embedded” effect to text by using two solid-colored shadows: the darker one appears to move slightly up and to the left, and the lighter one moves down and to the right.

Let’s make it happen!

Comments

  • index.html
  • style.css
HTML
<!DOCTYPE html> <html lang="en"> <head> <title>Embedded Text Effect</title> <meta charset="utf-8"> <link rel="stylesheet" href="style.css"> </head> <body> <h1>Night Club</h1> <span>☺</span> </body> </html>
CSS
body { background: url("pumpkin.jpg") no-repeat 50% 0; color: #2b2328; font-family: "Arial", sans-serif; } h1 { margin: 30px; text-transform: uppercase; font-weight: normal; font-size: 100px; } span { position: absolute; top: 270px; left: 30px; color: #cb454c; font-size: 150px; }

What didn’t you like in this task?

Thanks! We’ll fix everything at once!

The code has changed, click “Refresh” or turn autorun on.

You’ve gone to a different page

Click inside the mini-browser to shift the focus onto this window.

100%
Goalscompleted
0
    1. Give the heading h1 a shadow with a horizontal and vertical offset of -1px, feathering of 1px, and the color #1e181c,
    2. and then assign a second shadow with a horizontal and vertical offset of 2px, feathering of 1px, and the color #52424d.

    Cookies ∙ Privacy ∙ License Agreement ∙ About ∙ Contacts ∙ © HTML Academy OÜ, 2019−2025

    VISAMastercard

    Log in

    or

    Forgot your password?

    Sign up

    Sign up

    or
    Log in

    Restore access

    Have you forgotten your password or lost access to your profile? Enter your email connected to your profile and we will send you a link to restore access.

    Forgot to connect your email to the profile? Email us and we’ll help.