Code
Execute
<!DOCTYPE html> <html> <head> <title>Wikitechy rollover image in HTML </title> <base href="../try-it/"> </head> <body> <h2>Rollover Image In Html</h2> <img src="image1.png" onmouseover="this.src='image2.png'" onmouseout="this.src='image1.png'" /> </body> </html>
Result