This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Add tooltip to img Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Add tooltip to img" Watch "Add tooltip to img" New topic
Author

Add tooltip to img

albert kao
Ranch Hand

Joined: Feb 04, 2010
Posts: 245
How to add tooltip to the following img?
I tried more than 1 day but still no success.

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61103
    
  66

Use the title attribute. The alt attribute is used to provide alternative text describing the image in the event the image cannot be displayed (or for use by screen readers).


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
albert kao
Ranch Hand

Joined: Feb 04, 2010
Posts: 245
Bear Bibeault wrote:Use the title attribute. The alt attribute is used to provide alternative text describing the image in the event the image cannot be displayed (or for use by screen readers).


This compiles ok but has no tooltip.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61103
    
  66

The sever-side markup is not helpful. What HTML does that render at the browser? Is the title attribute empty?
albert kao
Ranch Hand

Joined: Feb 04, 2010
Posts: 245
Bear Bibeault wrote:The sever-side markup is not helpful. What HTML does that render at the browser? Is the title attribute empty?

I have two img but I only added "title" to one img.
After adding "title" to the second img, then the tooltip appeared.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Add tooltip to img