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
Example
Browser Support
The following information will show you the current browser support for the HTML abbr attribute. Hover over a browser icon to see the version that first introduced support for this HTML attribute.
This attribute is supported by all modern browsers.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 28th March 2024
