Tooltips with HTML Entities
This trick lets you overcome the text-length limit in ALT tags.
June 3, 2002
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.
—Deepak Kumar Vasudevan
[email protected]
About the Author
You May Also Like