What is the easiest way to create an HTML mouseover tool tip?

What is the easiest, cleanest way to create an HTML mouseover tool tip without using JavaScript?

<img id=Pennstate src="/blah">

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

0

2 Answers

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

<img src="" title="Stack Overflow">

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

1

If you don't care much what the tooltip looks like you can always just use the "title" attribute

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like