Advertisement
Home Open Editor ❯

HTML <track> kind Attribute

Example

<video width="340" height="260" controls playsinline>
  <source src="video.mp4" type="video/mp4">
  <source src="video.webm" type="video/webm">
  <track src="ensubtitle.vtt" kind="subtitles" srclang="en" label="English">
  <track src="frsubtitle.vtt" kind="subtitles" srclang="fr" label="French">
  Your browser does not support the video tag.
</video>

Try this code ❯

Meaning

The kind attribute specifies how the text track is meant to be used. If omitted the default kind is subtitles. If the attribute contains an invalid value, it will use metadata.


Standard Syntax

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

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


Advertisement

Attribute Values

Value Description
captions Closed captions provide a transcription and possibly a translation of audio.
chapters Chapter titles are intended to be used when the user is navigating the media resource.
descriptions Textual description of the video content. Suitable for users who are blind or where the video cannot be seen.
metadata The tracks used by scripts. Not visible to the user.
subtitles The track specifies subtitles, used to display subtitles in a video
Home Open Editor ❯
Advertisement