You're looking for tooltip
For the basic tooltip, you want:
<div title="This is my tooltip">
For a fancier javascript version, you can look into:
http://www.designer-daily.com/jquery-prototype-mootool-tooltips-12632
The above link gives you 12 options for tooltips.
The title attribute also works well with other html elements, for example a link...
<a title="hover text" ng-href="{{getUrl()}}"> download link
</a>
This can also be done in CSS, for more customisability:
.hoverable {
position: relative;
}
.hoverable>.hoverable__tooltip {
display: none;
}
.hoverable:hover>.hoverable__tooltip {
display: inline;
position: absolute;
top: 1em;
left: 1em;
background: #888;
border: 1px solid black;
}
_x000D_
<div class="hoverable">
<span class="hoverable__main">Main text</span>
<span class="hoverable__tooltip">Hover text</span>
</div>
_x000D_
(Obviously, styling can be improved)
Often i reach for the abbreviation html tag in this situation.
<abbr title="Hover">Text</abbr>
Source: Stackoverflow.com