What is the easiest way to create an HTML, mouse over tool tip?

stackoverflow picture stackoverflow · Sep 21, 2011 · Viewed 59k times · Source

What is the easiest, cleanest way to create an HTML, mouse over tool tip without using tons of extra js references?

<img id=Pennstate src="/blah" style="cursor:pointer;">

mouse over that and have a a nice tooltip "We are Pennstate!"

Answer

Samich picture Samich · Sep 21, 2011

The easiest way is to use the native HTML title attribute:

<img src="https://stackoverflow.com/favicon.ico"
     style="cursor:pointer;"
     title="Stack Overflow">

But if you need more, try the tooltip widget provided by jQuery UI since version 1.9.