I've been attempting to change an image on my website when I hover over it, but despite looking at various examples, I still can't get it to work. Can someone please help me figure out what I'm doing wrong?
Below is the HTML code I'm using:
<body>
<a id="swap"></a>
</body>
CSS code:
#swap {
background-image: url('slide1.jpg');
}
#swap:hover {
background-image: url('slide2.jpg');
}