Dofactory.com
Dofactory.com
Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

HTML <track> label Attribute

The label attribute on a <track> tag specifies the title of a track.

It‘s value is used by the browser when listing available text tracks.

Example

#

A label attribute on a <track> element.
The text track is labeled Spanish subtitles.

<video controls="controls" width="320" height="176">
  <source src="/media/godfather.mp4" type="video/mp4" />
  <source src="/media/godfather.ogg" type="video/ogg" />
  <track src="/media/godfather.srt" kind="subtitles" srclang="es" label="Spanish subtitle" />
</video>

Using label

The label attribute specifies the title of the text track.

This value will be used by the browser when listing available text tracks.


Syntax

<track src="URL" label="text">

Values

#

Value Description
text Track text title.

Browser support

Here is when label support started for each browser:

Chrome
23.0 Nov 2012
Firefox
31.0 Jul 2014
IE/Edge
10.0 Sep 2012
Opera
12.1 Nov 2012
Safari
6.0 Jul 2012

You may also like

 Back to <track>

Last updated on Sep 30, 2023

Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

Guides