© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
K. WilsonThe Absolute Beginner's Guide to HTML and CSShttps://doi.org/10.1007/978-1-4842-9250-1_5

5. Special Effects

Kevin Wilson1  
(1)
WIDNES, UK
 
Using HTML and CSS, you can add various effects to decorate your website. These include
  • Hover effects

  • Buttons

  • Rounded corners

  • Shadows

  • Gradients

These effects should be used sparingly as they can become irritating and distracting if used in abundance.

However, effects can be useful to add emphasis to a section or object.

Text Effects

In this example, we are going to add a shadow effect to a heading. Using CSS, we can style the heading using the text-shadow property:
h1 {
  text-shadow: 2px 2px 2px lightgrey;
}
We can also change ...

Get The Absolute Beginner's Guide to HTML and CSS: A Step-by-Step Guide with Examples and Lab Exercises now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.