Jump to content

How To Create Descriptive Titles


Mori
 Share

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...