HTML <track> Tag

<video src="https://www.PuStudy.Com/resources/countdown.ogg" width="300" height="150" controls>
<track src="https://www.PuStudy.Com/resources/countdown_en.vtt" kind="subtitles" srclang="en" label="English">
<p>Content for older browsers here...</p>
</video>

The above example demonstrates usage of the <track> element.

The <track> element allows you to specify external timed text tracks for media elements.

The <track> element can be used with the audio and video elements to provide subtitles, captions, descriptions, chapters, or metadata.

Attributes

As well as the global HTML attributes, the <track> element accepts the following attributes:

kind
The type of text track. Can be one of the following values:
  • subtitles
  • captions
  • descriptions
  • chapters
  • metadata
src
URL of the text track.
srclang
Language of the text track.
label
User-visible label.
default
Enable the track if no other text track is more suitable.