Many desktop browsers support tooltips, which are small windows that pop down under the cursor when mouse is placed over certain elements in the document.
As of HTML 4, the generally accepted way of producing a tooltip is to
put a title
attribute in the element tag, with the text
you want to be displayed in the tooltip.
It is unsurprising that there isn’t much consensus among the producers
of the several major browsers as to how tooltips and the
title
attribute should be implemented. Here, I’ve
made a small study of the various behaviors in several of the
browsers I have at my disposal.
Some browsers place the title
attribute text in the
status area of the browser window. MSIE produces tooltips with the
alt
attribute of some elements, so I also compared
browser treatment of that element.
Tooltips are especially handy for annotating clickable maps.
Since the advent of the abbr
element, they have been
used to display the meaning of abbreviations. There is some disagreement
over what the behavior of the title
attribute should
be for anchor (<a>
) elements, whose URL has
traditionally been displayed in the status area.
I have yet to find a smartphone-based web browser that supports tooltips at all: they lack the concept of “mouse hovering”. However, some e-book readers do support them: Kobo Reader in particular.
no title
with title
anchor
elementstitle
attribute will bring a tooltip.
map
area
elementsalt
or title
attribute will
bring a tooltip.
In presence of both alt
and title
attributes, always prefers alt
.
abbr
elementstitle
attribute displayed in tooltip.
anchor
elementsmap
area
elementstitle
attribute will bring a tooltip.
alt
has no visible effect.
abbr
elementstitle
attribute displayed in tooltip
In Opera, tooltips can be turned on and off: in Opera 6, Preferences-->General-->Accessibility. Since Opera 8, Settings-->Preferences-->Advanced-->Browsing.
anchor
elementsmap
area
elementstitle
attribute will bring a tooltip.
Text of title
attribute also displayed in status area.
abbr
elementstitle
attribute displayed in tooltip and
status area.