HTMLTableCellElement: abbr property
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
The It reflects the Note:
This property doesn't have a visual effect in browsers. It adds information to help assistive technology like screen readers that can use this abbreviation A string. This example adds prefixes with the abbreviation associated with the row header of each first cell.abbr
property of the HTMLTableCellElement
interface
indicates an abbreviation associated with the cell. If the cell does not represent a header cell , it is ignored.
abbr
attribute of the element.
Value
Examples
HTML
Manufacturer
Car model
Tesla
3
BYD
Dolphin
VW
ID.3
JavaScript
const rows = document.querySelectorAll("thead tr");
const cells = rows[0].cells;
for (const cell of cells) {
cell.textContent = `${cell.textContent} (${cell.abbr})`;
}
Results
Specifications
Specification HTML
# dom-th-abbrBrowser compatibility