RE: How do I do this?

by J_A_B(at)t-online.de (Jens Brueckmann)

 Date:  Fri, 05 Sep 2003 18:04:43 +0200
 To:  "hwg-techniques(at)hwg.org" <hwg-techniques(at)hwg.org>
 Cc:  "JohnsonM(at)issaquah.wednet.edu" <johnsonm(at)issaquah.wednet.edu>
  todo: View Thread, Original
Hi Mark,

I would recommend marking your terms with the elements <abbr></abbr> and 
<acronym></acronym> as this is what they are implemented for [1]. Use the 
title-attribute to define/explain your term.
You probably want to show that this term has some definition. Newer 
versions of Netscape and Opera draw a small dotted line under the term, 
alas! I.E. will neither draw your line nor recognize the markup. One 
workaround would be using the <span></span> element instead, with title- 
attribute and some styling like:
{ border-bottom: 1px dotted #000; }, or use both like <abbr 
title="blabla"><span class="definition" title="blabla">BLA</span></abbr>
with: .definition {border.... and whatever}.

One big advantage using <abbr> and <acronym> is that you are able to 
extract these easily with JavaScript using 
document.getElementsByTagName('abbr') or 
document.getElementsByTagName('acronym') respectively, as they are 
definitely not used for any other purpose than defining terms, whereas the 
<span> element might be used for many things.

Hope this might help.

jens


[1] http://www.w3.org/TR/html401/struct/text.html#h-9.2.1

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA