HTML <track> Tag

The track tag is used to provide text tracks for <audio> or  <video> components.

This element is used to designate which subtitles, caption files, or other text-containing files should be shown when the media is playing.

WebVTT format is used for the tracks (.vtt files).



Attribute Value Description
default default Specifies that the track should be activated if the user's choices do not suggest that another track would be a better fit.
kind captions 
This parameter specifies the type of text track.
label text Specifies the text track's title.
src URL Required. Specifies the track file's URL.
srclang language-code The language of the track text data (needed if kind="subtitles") is specified.

Supported Browsers

Element Chrome Firefox Safari Edge / IE Opera
<track> 23.0 31.0 6.0 10.0 12.1