Skip to page content or Skip to Accesskey List.

Work

Main Page Content

Html Is Not An Acronym

Rated 3.79 (Ratings: 17)

Want more?

  • More articles in Code
 

Craig Saila

Member info

User since: 26 Aug 1999

Articles written: 6

HTML is, however, an abbreviation. So what is an acronym?

Unlike, say the French language, there is no official body that determines what is and isn’t proper English. Like the Web, though, there are a series of recommendations from recognized organizations. And, again, like the Web, there are those who disagree with the generally agreed upon usage. Nevertheless, most lexicographers would likely agree with Merriam-Webster’s Collegiate Dictionary which defines:

  • an acronym as “a word (as NATO, radar, or snafu) formed from the initial letter or letters of each of the successive parts or major parts of a compound term;”
  • an abbreviation as “a shortened form of a written word or phrase used in place of the whole.”

The Oxford Companion to the English Language goes so far as to define three types of acronyms:

“HTML” is none of these, rather it is an initialism, which Oxford—among many others—defines as an abbreviation that “consists of the initial letters of a series of words, pronounced in sequence.” Like acronyms, initialisms have word-like qualities, and can take affixes (e.g., pro-CSS, HTMLer).

How to use

Despite these well-recognized definitions, there remains a lot of confusion as to what an acronym is (including some who should know better). On the Web, the blame can likely be traced to the W3C’s own troublesome acronym definition (which was challenged even before HTML 4.0 was recommended). Compounding the problem was Microsoft’s strange decision not to support the abbr element in its Windows-based browsers.

As a result many developers (including myself, for a time) use acronym in place of abbr. Unfortunately, this is exactly the opposite thing that should be done: when in doubt, wrap the abbreviation/acronym/initialism with abbr. Even if it is an acronym, the mark-up will be semantically correct.

Styling

Ironically, to ease the confusion over the W3C’s definition, a new style property, speak, was created. Using it, an acronym could can be styled with “speak: normal” while an initialism could use this: “speak: spell-out.”

Though speak is designed for aural browsers, Mozilla/Netscape 6+ also treat abbr and acronym differently by placing a one-pixel, dotted, black border under the abbreviation. Inspired by the look, many site authors are now adding the following rule to their style sheets:

ABBR, ACRONYM { border-bottom: 1px dotted #000; cursor: help; }

(Internet Explorer on Windows will display this style as a one-pixel, dashed, black border under acronym but not abbr.)

When to use

Another common question about using the abbr and acronym is how often to use them. The Web Content Accessibility Guidelines suggest following the conventions of traditional written English and include the definition in the relevant element’s title when the definition first appears:

<p>Dynamic <abbr title="HyperText Markup Language">HTML</abbr> is a mixture of HTML, <abbr title="Cascading Style Sheets">CSS</abbr>, and JavaScript.</p>

Where the guidelines are unclear is on what to do after that initial reference. Some suggest wrapping the second definition with an element, without the title. The reasoning being that screen readers will see the following references as more than a collection of letters.

Whichever method is used, it should work today and continue to be future-proof.

Craig Saila has been working the Web since 1996, and has redesigned some of North America's top news organizations including msnbc.com and The Globe and Mail. Throughout his work, he’s divided his time between client-side development and online journalism — dual interests which are apparent at his site, saila.com.

The access keys for this page are: ALT (Control on a Mac) plus:

evolt.org Evolt.org is an all-volunteer resource for web developers made up of a discussion list, a browser archive, and member-submitted articles. This article is the property of its author, please do not redistribute or use elsewhere without checking with the author.