A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/html/elements/abbr below:

abbr · WebPlatform Docs

abbr Summary

Use the abbr element to indicate an abbreviation or acronym.

Overview Table
DOM Interface
HTMLElement

The abbr is a phrasing-level element used to indicate an abbreviation or acronym. It can’t contain block-level elements, but it can contain other phrasing type elements.

The abbr element’s role has been expanded to incorporate the role previously performed by acronym element (which has been deprecated).

Attributes

A abbr element may optionally have a title attribute that must contain an expansion of the abbreviation (and nothing else). The abbr element can accept any attributes permitted globally (e.g. class).

Examples

The following example shows how to use the abbr element with an optional title attribute.

<p>The national capital of the
United States is located in Washington,
<abbr title="District of Columbia">D.C.</abbr>.</p>

View live example

Linking an abbreviation to its definition

<p>
The <dfn id="HTML">Hyper Text Markup Language</dfn>
(<abbr title="HyperText Markup Language">HTML</abbr>) is the publishing language of the World Wide Web.
</p>
<p>The first version of <a href="#HTML"><abbr title="Hyper Text Markup Language">HTML</abbr></a>
 was described by Tim Berners-Lee in late 1991.</p>
Usage
 Abbreviations don’t have to marked up in the abbr element, but it can be useful

In the first two instances, it would make sense to include an expansion of the abbreviation in a title attribute.

Notes

If you use the same abbreviation multiple times in a document, you might consider using a title to expand the first instance (perhaps wrapping it in a dfn element to mark it as the defining instance) and then leave the title attribute off of the additional instances. This may provide a better reading experience for assistive technologies, but it should be noted that the instances without title attributes will not provide the expanded text as each abbr is independent (expansions are not shared among identical abbr elements).

Related specifications
HTML 5.1
W3C Working Draft
HTML 5
W3C Recommendation
HTML 4.01
W3C Recommendation

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4