HTML Academy
Unicode Characters
Text Formatting2/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
Horizontal Text Shadow Offset
  • Sign up
  • Log in

Loading…
Everything will be ready in few seconds

  • Theory
  • Theory
  • Comments

The text-shadow Property

First let’s learn a little bit more about text shadows.

Text shadows are created using the text-shadow CSS property. It is very similar to box-shadow, which was discussed in one of the previous chapters, but it has its own peculiarities:

  • The text-shadow property is applied to text;
  • The shape of the shadow follows the shape of the text characters;
  • You can control the offset, color, as well as feathering of the shadow;
  • You cannot control the amount of stretching of the text shadow;
  • You can create multiple shadows.

First, let’s create a shadow for the heading and emoticon, and then let’s look at all the property parameters in more detail.

Comments

  • index.html
  • style.css
HTML
<!DOCTYPE html> <html lang="en"> <head> <title>The text-shadow Property</title> <meta charset="utf-8"> <link rel="stylesheet" href="style.css"> </head> <body> <h1>In the Airplane.<br>Let’s Fly to Mexico!</h1> <span>☻</span> </body> </html>
CSS
body { background: url("sky.jpg") no-repeat 0 0; color: #ecf0f1; font-family: "Arial", sans-serif; } h1 { margin: 40px 40px 200px; font-weight: normal; font-size: 50px; } span { margin: 50px; font-size: 80px; }

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

    Assign the value 30px 30px 1px #111111 to the text-shadow property

    1. the heading h1,
    2. and the emoticon span.

    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.