TableHeader abbr attribute

Definition and usage

abbr Sets or returns the value of the abbr attribute.

<th> abbr attribute Specifies a shorter version of the content of the title cell.

Note:The abbr attribute has no visual effect in common web browsers, but it can be used by screen readers.

See also:

HTML Reference Manual:HTML <th> Tag

Example

Example 1

Return the value of the abbr attribute of the <th> element with id "myTh":

var x = document.getElementById("myTh").abbr;

Try it yourself

Example 2

Change the value of the abbr attribute of the <th> element with id "myTh":

document.getElementById("myTh").abbr = "newValue";

Try it yourself

Syntax

Return the abbr attribute:

tableheaderObject.abbr

Set the abbr attribute:

tableheaderObject.abbr = text

Attribute Value

Value Description
text Specifies a brief description of the content of the header cell.

Technical Details

Return Value: A string value that represents a brief description of the content of the header cell.

Browser Support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support Support Support Support Support

Related Pages

HTML Reference Manual:HTML <th> abbr Attribute