X
HOME HTML5 CSS3 JAVASCRIPT SQL PHP5 JQUERY ANGULAR BOOTSTRAP3 XML MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

Track label Property

Track Object Reference Track Object

Example

Get the label of the text track:

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

The result of x could be:

English



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

Internet Explorer Firefox Opera Google Chrome Safari

The label property is supported Internet Explorer, Opera, and Chrome.

Note: The label property is not supported in Firefox, Safari or Internet Explorer 9 and earlier versions.


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 Reference Track Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook