Dofactory.com
Dofactory.com
Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

HTML <track> kind Attribute

The kind attribute on a <track> tag specifies the type, or kind, of text track.

Video and audio tracks can be subtitles, captions, descriptions, and others.

Example

#

A kind attribute on a <track> element.
The video track contains subtitles in Spanish.

<video controls="controls" width="320" height="176">
  <source src="/media/godfather.mp4" type="video/mp4" />
  <source src="/media/godfather.ogg" type="video/ogg" />
  <track src="/media/godfather.srt" kind="subtitles" srclang="es" label="Spanish" />
</video>

Using kind

The kind attribute specifies what type, or kind, the text track is.

Text tracks can be used as subtitles, captions, descriptions, chapters, and others.


Syntax


<track src="URL" kind="subtitles | captions |  descriptions | chapters | metadata">

Note:  The kind attribute requires that the src attribute has a URL value.

Values

#

Value Description
subtitles Specifies subtitles for the media source.
captions Specifies translation of dialogues and sound effects.
descriptions Specifies textual descriptions of the media source.
chapters Specifies chapter titles used for navigating the media source.
metadata Specifies a track used by scripts. Not visible to users.

Browser support

Here is when kind support started for each browser:

Chrome
23.0 Nov 2012
Firefox
31.0 Jul 2014
IE/Edge
10.0 Sep 2012
Opera
12.1 Nov 2012
Safari
6.0 Jul 2012

You may also like

 Back to <track>

Last updated on Sep 30, 2023

Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

Guides