HTML DOM Track label Property

Track Object : Get the label of the text track

Definition and Usage

The label property sets or returns the value of the label attribute of the track.

The label attribute specifies the label/title of the text track.

The title of the text track is used by the browser when listing available text tracks.

Browser Support

Property
label Yes 10.0 Not supported Not supported Yes

Syntax

Return the label property:

trackObject.label

Set the label property:

trackObject.label = label

Property Values

Value Description
label Specifies the label/title of the text track

Technical Details

Return Value: A String, representing the label/title of the text track

More Examples

Example

Set the label of text track:

document.getElementById("myTrack").label = "Norwegian";

Related Pages

HTML reference: HTML <track> label attribute

❮ Track Object