The ABBR Tag

A couple of months ago, I had written an entry entitled The Acronym Tag, which was a brief discussion on a standard, if decidedly underemployed, HTML tag. Following the discussion, I had used a little stylesheet trick to make more effective use of the <acronym> tag for my Internet Explorer readers.

Recently, though, Anne van Kesteren pointed out that I was actually making improper use of the <acronym> tag. He directed me to an article by Craig Saila that discussed the difference between an acronym and an abbreviation. You can read the article, but here is a distillation. The English language shortens words using any one of three ways, which are as follows:

# The acronym–a word which is created using the initials or syllables of a longer term or phrase
# The abbreviation–a truncated word or phrase (note: this result is not a pronouncable word)
# The initialism–an abbreviation made by using the initials of a longer term or phrase (note: this, too, does not result in a pronouncable word)

Initialisms, according to Saila, are not acronyms, but rather are abbreviations. A glance through my copy of Hodges’ Harbrace Handbook confirmed that Saila is right–acronyms are always new, pronoucable words (like laser), whereas abbreviations are either truncated with a period (like Jan.) or made of capitalized initialisms (like NJ).

No big deal. All of my acronyms since May are populated with MT Macros automatically. So, all I had to do was go through my MT Macros list and change all the “acronyms” that I couldn’t pronounce as words into “abbreviations” and rebuild the site. Right?

Well, yes and no. See, the <abbr> tag has a bit of a problem in Internet Explorer in that IE doesn’t support it–at all. It won’t generate a popup with the title when you mouseover it, and it doesn’t underline when you set up a border-bottom: 1px dotted gray; in your stylesheet. So, by modifying my MT Macros file, I effectively break the tooltip functionality for the IE visitors. Lame.

Some more poking and prodding turned up a couple of ideas. I discovered this page by Marek Prokop which discusses a JavaScript workaround for the IE problem. Since I use MT Macros, I can easily incorporate Prokop’s solution on the server side in my preflight processing.

More hunting around in my Macros code made me realize two things. First, that <abbr> tags were being converted to <acronym> tags (this was actually mentioned in Mark’s entry). Second, that both of those tags were being wrapped with a <span class="caps"> element. Google turned up this article indicating that the <span> was automatically being appended with MT Textile. I made the change that Arve suggested to my textile.pm file and went back to modify my MT Macros code, adding a couple of lines to process abbreviation tags the same way that acronyms are processed.

After everything is said and done, my <abbr> tags are wrapped with a <span> element which does the styling and the tooltip, further separating markup and style and making the site more semantically correct. Revised version of the Macros template can be found on the about page. Enjoy. ;-)

5 thoughts on “The ABBR Tag

  1. That’s funny – I was actually going to correct Ken for saying “He” instead of “She” – But I was going to do it via a question. Instead, I shall simply ask where it is that Anne is a male name? Is it a cultural thing, or a one off? I find it interesting. Actually, that root is one of my favorites, but I’ve never seen it used for a guy before. (Other than Andrew and such)

    Anyway, keep with the hip. And if I could use HTML in comments, I would make sure I included some broken acronym tags just to make sure this page was forever broken. ;P

  2. ROFL! Ryan, that is TFTIEH (The Funniest Thing I Ever Heard)! HTML in comments! Ha! K took HTML from MT sometime in Jun. and it seems O.K. (now, can I ask, what exactly does O.K. stand for? Ornary Kittens? Oval Kansas? Obsolete Ketchup?). FYI, isn’t is TFTYEH that someone whose language is not naturally Eng. is correcting we, who speak Eng. as a lang.?

  3. It’s a Dutch name. Here in Holland there is also some confusion sometimes :) . Because the name actually comes from the north of holland from a “region” called “Friesland”, not that I live there, but that’s were the name comes from :) .