0

Does anyone know if there is a convention for including inline definitions of words within HTML text?

I've made a documentation platform. It auto-generates glossaries, but I also want the user to have the option of having terms from the glossary definable inline, as the user reads, so they don't have to jump to the glossary page.

Possibilities:

  • transperambulation (?)
  • transperambulation [DEF]
  • transperambulation [def.]
  • transperambulation (nothing after the word, but the word itself underlined with dotted border)

It would need to be a hover (tooltip) effect as the word may also be a link, so clicking it is reserved for the link target.

Or is this a bad idea in general?

Mitya
  • 33,629
  • 9
  • 60
  • 107
  • 1
    One example can be found in bootstrap: http://getbootstrap.com/css/#type (Abbreviations section). – Cthulhu Feb 14 '14 at 12:46
  • 2
    This is a design issue rather than a coding problem, and there are many possible answers, with pros and cons. A choice between them is partly context- and audience-dependent, partly a subjective opinion. On the technical side, we can just say normally it should clearly differ from common renderings of links, yet suggest that there is some information (definition) available. – Jukka K. Korpela Feb 14 '14 at 13:21

1 Answers1

0

what about the abbr tag? it uses the title attr with a dotted underline http://www.w3schools.com/tags/tag_abbr.asp

i would use that

arieljuod
  • 15,460
  • 2
  • 25
  • 36
  • I see your thinking but you could argue use of the ABBR tag was functional but not semantic, since I'm defining words, not abbreviations. +1 anyway for the thought since, as you say, it does come with a ready-made dotted line. – Mitya Feb 14 '14 at 16:06