CSS hover attribute

Am I able to use the hover attribute outside of links or not? Because I want to make a section white when I hover over it and I’m not sure how I would be able to do that.
Thx for the help in advance!

A rookie front-end dev

Yes, you can use the hover pseudo-class on any element you want, for example on an h1:

h1:hover {
    color: red;

Ok,would you be able to use it like this maybe?


With welcome-section a class or id for a specific section or div or whatever.

Why don’t you give it a try and find out :slight_smile: Experimenting is a great way to learn!

1 Like

I just wanted to make sure lol