Skip to main content
GOAL: Add "hover text" when a mouse hovers over a certain word in an HTML webpage.
CODE
<p title="Hover Text"> Word <p>
EXAMPLE
Word
Hover over the "Word" above to see "Hover Text". This is a very simple way of adding hover text using a native part of HTML: the title attribute. Note: You can use the "title" attribute with HTML text tags beyond <p> tag, such as <h1>, <h2>, <h3>.