How to change image on hover with CSS ? Read Courses Improve Improve Improve Like Article Like Save Article Save Report issue Report The approach of this article is to change an image when the user hovering the mouse over it. This task can be simply done by using the CSS background-image property in combination with the :hover pseudo-class to replace or change the image on mouseover. Example: HTML <!DOCTYPE html> <html lang="en"> <head> <title> How to Change Image on Hover in CSS </title> <style> .sudo { width: 230px; height: 195px; margin: 50px; background-image: url( "https://media.geeksforgeeks.org/wp-content/cdn-uploads/20190417124305/250.png"); } .sudo:hover { background-image: url( "https://media.geeksforgeeks.org/wp-content/uploads/rk.png"); } </style> </head> <body> <h2>GeeksForGeeks</h2> <h2> How to change image on hover with CSS </h2> <div class="sudo"></div> </body> </html> Output: Before hovering the mouse over the image: After hovering the mouse over the image: Supported Browsers are listed below: Google Chrome Internet Explorer Firefox Opera Safari Learn to code easily with our course Coding for Everyone. This course is accessible and designed for everyone, even if you're new to coding. Start today and join millions on a journey to improve your skills! Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now! Looking for a place to share your ideas, learn, and connect? Our Community portal is just the spot! Come join us and see what all the buzz is about! Last Updated : 26 Nov, 2020 Like Article Save Article Previous How to group footer content in form of table using HTML ? Next Fluid width with equally spaced div using CSS Share your thoughts in the comments Add Your Comment Please Login to comment...