Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Track label property

Track label property

Track Object Reference The Track object

Example

Get the text track label:

var x = document.getElementById("myTrack").label;

x The output result is:

English


Definition and Usage

The label property is used to set or return the value of the label property of the track.

The label property describes the label/title of the text track.


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


Attribute values

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

Technical Details

Return value: A string representing the title/label of the track text

Track Object Reference The Track object