I'm trying to create a hover that will change the picture. A lot of tutorials tell me to try onmouseover and onmouseout. But Brackets (the program I use to code) isn't able to find the second picture called "test2.png". Does anybody know how I could handle the issue, preferably using only HTML.
Here are the tutorials I watched that show what I would like to achieve:
https://www.youtube.com/watch?v=qtpa_r1ILjo
https://www.youtube.com/watch?v=y4RJDUI7M8Y
<!DOCTYPE html>
<html>
<head>
<title>Portfolio V1</title>
<link rel="stylesheet" type="text/css" href="main.css"/>
<script type="text/javascript"></script>
</head>
<body>
<img src="images/test1.png" onmouseover="this.src=images/test2.png" onmouseout="this.src='test1.png'" >
</body>
</html>
onmouseover
with quotes:'images/test2.png'
).onmouseout
you set the image totest1.png
instead ofimages/test1.png
. Is it intended?Here is a working example: