Anne van Kesteren

The ABBR attribute

HTML 4.01 states:

This attribute should be used to provide an abbreviated form of the cell's content, and may be rendered by user agents when appropriate in place of the cell's content. Abbreviated names should be short since user agents may render them repeatedly. For instance, speech synthesizers may render the abbreviated headers relating to a particular cell before rendering that cell's content.

My question, should a user agent always use it? If not, when would it be appropriate? Should it be implanted like:

td[abbr]{
 content:attr(abbr,string);
}

Last question: should I use it for abbreviating week days?

Comments

  1. I think the 'abbr' attribute should be used if the width of the <th> and <td> becomes too narrow to fit the original content of the columns. It also serves as an alternative to non-visual browsers so they don't have to read the non-abbreviated form every time (the column headers are read to the user each time the column content is read).

    Posted by Asbjorn Ulsberg at

  2. Use acronym instead of abbr.

    See http://www.mezzoblue.com/archives/2004/01/03/acronym_vs_a/.

    Posted by MaThIbUs at

  3. There is a difference between an attribute and an element ;-)

    Posted by Anne at

  4. @ MaThIbUs:

    Like Anne said, it's about the abbr attribute, not the element. Personally, I use both: acronym for acronyms, and abbr for all abbreviations that are not acronyms. If I had to choose one - however - I would not choose for acronym. I know Dave and Mark have pointed out some advantages of acronym, but in my opinion there have been even stronger arguements for abbr: by people like Jaques, but especially Jesper. Besides, it's very likely XHTML2 will only have the abbr element.

    My 2 cents...

    Posted by ACJ at

  5. Some reformulations of XHTML (as +Print, or whatever it's called) require the abbr attibute to be followed. I use it in my table with 28K of largely-useless extra markup, if anyone wants to try it out.

    Posted by Joe Clark at