Sometimes, we want to display text on mouse over for image in HTML.
In this article, we’ll look at how to display text on mouse over for image in HTML.
How to display text on mouse over for image in HTML?
To display text on mouse over for image in HTML, we set the title
attribute.
For instance, we write
<img src="smiley.gif" title="Smiley face" />
to set the title
attribute to show Smiley face
when we hover over the image.
Conclusion
To display text on mouse over for image in HTML, we set the title
attribute.