Jump to content

How To Create Descriptive Titles


Mori

Recommended Posts

Hi, I'd like to put a sentence on my page so that when a user puts their mouse over a certain word, a tooltip appears including some information. I know how to create a linked word with title, but I don't want it to be a link. Also how should I do it for an image. Thanks in advance! Regards Mori

Link to comment
Share on other sites

You should add and Alt-text to the image:

<img title="..." alt="..." src="html://www.example.com/image.jpg" />

That will display the alt-text when an image is not available for display. (older) IE uses it as the Title as well.

Link to comment
Share on other sites

I need something very simple. Are the following codes correct: For text: <a title=".....">text</a> For images: <img title="..." src="html://www.example.com/image.jpg" /> Any better suggestions?
For text, use the <span> element, not the <a> element. If it's an abbreviation, the <abbr> element is preferrable.
<span title=".....">text</span>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...