Is there any accepted standard or tag (HTML or otherwise) for a definition when it ISN'T an abbreviation or acronym? For instance, if I said "My house is mahogany and blue" and I wanted a tooltip (like the title of an anchor tag) on mahogany to read, "a color", is there some other way I ought to mark it, or should I just use anchor tags?

To make it more clear, the code I'm referencing is: My house is <a title="a color">mahogany</a> and blue

4 answers

0
points
This was chosen as the best answer

isn't abusing title to get tooltips a "bad" idea? Using a link element that doesn't go anywhere to create a tooltip for mouse users is poor practice in terms of accessibility.

What about the dfn element?

alternatively add a link to a footnote and enhance its presentation with CSS, like this:

http://www.twinhelix.com/dhtml/supernote/demo/

Answered about 3 years ago by Tony Crockford
danwellman 5600
1
point

You can use the title attribute on much more than just anchor tags to display a basic system tooltip.

The W3C HTML 4.01 recommendation states that titles can be used on any number of HTML elements

You can use this page to check whether the title attribute is valid for the element you are using, div and p elements for example both support it

Answered about 3 years ago by danwellman
Tohuw 0
0
points

Ah, good point. I had forgotten just how many elements support titles. For now, I've decided to use spans and style it with a CSS class. There ought to be some element like abbr or acronym, but for definitions. (Yes, I know there's definition lists, but that's not quite what I want.)

Answered about 3 years ago by Tohuw
  • dfn is the element like abbr and acronym that is used to wrap a word that is the defining instance of the enclosed term. Tony Crockford about 3 years ago
Tohuw 0
0
points

Tony, while I don't see the issue in using title to, well, title something, dfn is exactly what I was looking for. Thank you much.

Answered about 3 years ago by Tohuw