Summary
The HTML Abbreviation element (<abbr>) represents an abbreviation and optionally provides a full description for it. If present, the title
attribute must contain this full description and nothing else.
<p>I do <abbr title="Hypertext Markup Language">HTML</abbr></p>
See more in depth examples in the How to mark abbreviations and make them understandable article.
DOM Interface | {{domxref("HTMLElement")}} |
---|---|
Content categories | Flow content, phrasing content, palpable content |
Permitted content | Phrasing content |
Permitted parent elements | Any element that accepts phrasing content |
Attributes
This element only includes the global attributes.
Use the {{htmlattrxref("title")}} attribute to define the full description of the abbreviation. Many user agents present this as a tooltip.
Note: In languages with grammatical number (especially languages with more than two numbers, like Arabic), use the same grammatical number in your title
attribute as inside your <abbr>
element.
Specifications
Specification | Status | Comment |
---|---|---|
{{SpecName('HTML WHATWG', 'text-level-semantics.html#the-abbr-element', '<abbr>')}} | {{Spec2('HTML WHATWG')}} | |
{{SpecName('HTML5 W3C', 'text-level-semantics.html#the-abbr-element', '<abbr>')}} | {{Spec2('HTML5 W3C')}} | |
{{SpecName('HTML4.01', 'struct/text.html#edef-ABBR', '<abbr>')}} | {{Spec2('HTML4.01')}} |
Browser compatibility
{{CompatibilityTable}}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | 2.0 | {{CompatGeckoDesktop(1.0)}} [1] | 7.0 | 1.3 | {{CompatVersionUnknown}} |
Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
[1] Up to Gecko 1.9.2 (Firefox 3.6), Firefox implemented the {{domxref("HTMLSpanElement")}} interface for this element instead of the {{domxref("HTMLElement")}} interface.
Default styling
The purpose of this element is purely for the convenience of the author and all browsers display it inline ({{cssxref('display')}}: inline
) by default, though its default styling varies from one browser to another:
- Some browsers, like Internet Explorer, do not style it differently than a {{HTMLElement("span")}} element.
- Opera, Firefox, and some others add a dotted underline to the content of the element.
- A few browsers not only add a dotted underline, but also put it in small caps; to avoid this styling, adding something like {{cssxref('font-variant')}}
: none
in the CSS takes care of this case.
See also
- Using the <abbr> element
- Other elements conveying text-level semantics: {{HTMLElement("a")}}, {{HTMLElement("em")}}, {{HTMLElement("strong")}}, {{HTMLElement("small")}}, {{HTMLElement("cite")}}, {{HTMLElement("q")}}, {{HTMLElement("dfn")}}, {{HTMLElement("time")}}, {{HTMLElement("code")}}, {{HTMLElement("var")}}, {{HTMLElement("samp")}}, {{HTMLElement("kbd")}}, {{HTMLElement("sub")}}, {{HTMLElement("sup")}}, {{HTMLElement("b")}}, {{HTMLElement("i")}}, {{HTMLElement("mark")}}, {{HTMLElement("ruby")}}, {{HTMLElement("rp")}}, {{HTMLElement("rt")}}, {{HTMLElement("bdo")}}, {{HTMLElement("span")}}, {{HTMLElement("br")}}, {{HTMLElement("wbr")}}.