HTML <track> Tag


The HTML 5 <track> tag is used to specify external timed text tracks for media elements (i.e. the <video> element and the <audio> element). The text tracks specified with the <track> tag could include subtitles, captions, descriptions, chapters, and metadata.

Example Code:
<video width="300" height="240" controls>
  <source src="audio/toy.mp4" type="video/mp4">
  <track src="subtitles_en.vtt" kind="subtitles" srclang="en" label="English">
  <track src="subtitles_it.vtt" kind="subtitles" srclang="it" label="Italian">
  Your browser does not support the video tag.
Attribute Definition
default Specifies that the track is to be enabled if the user's preferences do not indicate that another track would be more appropriate
kind How the text track is meant to be used. If omitted the default kind is subtitles. If the attribute is not present, it will use the subtitles.

Possible Values:
  • subtitles
  • captions
  • descriptions
  • chapters
  • metadata
label Specifies the kind of text track
src Required. Specifies the URL of the track file
srclang Specifies the language of the track text data (required if kind="subtitles")
Global Attributes:

The <track> tag also supports the Global Attributes in HTML5

Event Attributes:

The <track> tag also supports the Event Attributes in HTML5