Skip navigation

Tooltips with HTML Entities

Downloads
25366.zip

My company typically uses ALT tags with our images not only to provide an alternative for users who don't want to wait a long time for images to download but also as an elegant way to provide an explanatory tooltip. Unfortunately, the text length in these ALT tags is limiting. We've come up with a small trick to solve this limitation. We use line breaks and indentations to make tooltips more explanatory. But be warned that these tooltips persist for only about 4 seconds.

You can extend the tooltip property to any HTML element that has a TITLE attribute. Listing 1 contains a sample tooltip. Although not all browsers support the tooltip property, it works in Microsoft Internet Explorer (IE) without a glitch.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish