I would like to display text when the user mouseovers the image.
How can I do this in HTML/JS?
You can use title attribute.
You can change the source of image as you want.
And as @Gray commented:
You can also use the title on other things like anchors, , , etc.
See: this