HTML Tag Reference - HTML tag <track>








The <track> tag marks text tracks for media elements <audio> and <video>.

Browser compatibility

<track> Yes 10.0 Yes Yes Yes

What's new in HTML5

The <track> tag is new in HTML5.

Attribute

Attribute Value Description
default default Mark default track
kind captions
chapters
descriptions
metadata
subtitles
Specifies the kind of text track
label text Set the title of the text track
src URL Required. Set the URL of the track file
srclang language_code Set the language of the track text data (required if kind="subtitles")




Global Attributes

The <track> tag supports the Global Attributes in HTML.

Event Attributes

The <track> tag supports the Event Attributes in HTML.

Default CSS Settings

None.

Example

<video width="320" height="240" controls>
  <source src="sound.mp4" type="video/mp4">
  <source src="sound.ogg" type="video/ogg">
  <track src="subtitles_en.vtt" kind="subtitles" srclang="en" label="English">
  <track src="subtitles_ca.vtt" kind="subtitles" srclang="ca" label="Canadian">
</video>