HTML abbr Attribute

Description

The abbr attribute in HTML is used to specify a short form or an abbreviation for the content of a <th> (table header) element. This attribute is particularly useful when the table header contains long text or phrases and you want to provide a more concise version that represents the same information. For example, in a table displaying various statistics, a column header might read "Percentage of Market Share," which could be abbreviated as "PMS." By using the abbr attribute, you can make the table more accessible, especially for screen readers, as it helps them understand and communicate the content more efficiently. Here's how you might use it in context:

<table>
  <tr>
    <th abbr="PMS">Percentage of Market Share</th>
    <!-- Other headers -->
  </tr>
  <!-- Table rows and cells -->
</table>

In this example, screen readers and other assistive technologies can use the abbreviation "PMS" instead of the full text "Percentage of Market Share," making the information easier to comprehend and navigate for users relying on these technologies. This attribute is part of the efforts to make web content more accessible and user-friendly, adhering to web standards and best practices.

Syntax

<th abbr="text">

Values

  • textA short text string for the <th> tag.

Applies To

The abbr attribute can be used on the following html elements.

Example

<table border="1">
<tr>
<th attr="Name">Employee Name</th>
<th attr="Role">Employee Role</th>
</tr>
<tr>
<td>John Doe</td>
<td>Marketing</td>
</tr>
<tr>
<td>Jane Doe</td>
<td>Sales Manager</td>
</tr>
</table>

Browser Support

The following table will show you the current browser support for the HTML abbr Attribute.

Desktop
Edge Chrome Firefox Opera Safari
1211151
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview
18414114.4

Last updated by CSSPortal on: 28th March 2024