The track tag is used to add text tracks for the video.

In the source attribute, the path of the video is to be placed.

You can add subtitles and captions inside the kind attribute.

Sample code

<!DOCTYPE html>



<video src=”video.mp4″>

<track kind=”subtitles” src=”video.en.vtt” srclang=”en” label=”English”>

<track kind=”captions” src=”video.en.hoh.vtt” srclang=”en” label=”text to be added here”>

<track kind=”subtitles” src=”” srclang=”tn” lang=”tn” label=”tamil”>




Keywords used in track element.

  • subtitles
  • captions
  • descriptions
  • chapters
  • metadata

More elements

More attributes