HTML / HTML Attributes

HTML Abbr Attribute

Oct 12, 2022
2 min read
HTML abbr Attribute

Definition

The abbr Attribute specifies a short abbreviated description or alternative label for the header cell.

Applicable Elements

The abbr Attribute can be used with the following elements:

HTML <th> abbr Attribute

A <th> element represents a table cell used for a heading. The exact nature of the heading is determined by the scope and headers attributes.

The abbr attribute specifies a short abbreviated description or alternative label. This may be announced by technology such as screen readers before cell content.

Syntax

<th abbr="Model">Model of car</th>

Usage

  • The abbr attribute may contain an abbreviated version, expansion, or different phrasing of the content in the header cell.
  • The abbr attribute may be used in other situations, such as referencing what header cells apply to a data cell. See the headers attribute for more details.
  • The abbr attribute value is not displayed on the HTML page, but it is often read by assistive technologies such as screen readers. For example, a screen reader may read out the <th> content value on the first reading, followed by the value of the abbr attribute on subsequent readings.

Values

Values can include:

  • text

Example

A table that has abbreviated headings for screen readers:

<table>
    <thead>
        <tr>
            <th abbr="Make">Car Manufacturer</th>
            <th abbr="Model">Car Model</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Ford</td>
            <td>Mustang</td>
        </tr>
        <tr>
            <td>BMW</td>
            <td>320d</td>
        </tr>
    </tbody>
</table>

Specification

The abbr HTML specification for the <th> element is as follows:

Browser Support

The abbr attribute has the following browser support:

Desktop

ChromeEdgeFirefoxIEOperaSafari
<th>YesYesYesYesYesYes

Mobile

Android WebviewChrome AndroidFirefox AndroidOpera AndroidiOS SafariSamsung Internet
<th>NoYesNoYesYesYes