Friday, August 8, 2008

The <abbr> tag

The abbr element is a phrase element. This means that it is an inline element that adds semantic information to strings of text.

This tag is used to indicate that the enclosed text is an abbreviation. Firefox and Opera render the abbreviation text with a dotted underline, but IE7 and Safari don't.

Note: An abbreviation is a shortened form of a word or phrase. Whereas an acronym is a word formed of the first letters of a phrase. Example: OPEC

title attribute

The title attribute can contain the expanded form of the abbreviation.

Example: <abbr title="modulator-demodulator">modem</abbr>

When the mouse hovers over the abbreviation, the browser displays the expanded form as a tool-tip.

No comments: