CKTIS / HTML
track — timed text tracks
The track element attaches an external, time-aligned text track to audio or video, such as dialogue subtitles, captions including sound information, or metadata. It does not create a separate visible element on its own.
Version: WHATWG HTML Living Standard; index snapshot date recorded separately
Syntax
<video controls src="movie.webm">
<track kind="subtitles" src="subtitles.en.vtt" srclang="en" label="English" default>
</video>track is a direct child of audio or video, placed after any source elements and before fallback content. It is a void element: it has neither content nor an end tag. The required src points to track data, commonly WebVTT.
kind distinguishes subtitles (dialogue), captions (dialogue and relevant sounds), descriptions (visual descriptions intended for speech synthesis), chapters (chapter metadata), and metadata (data for scripts). Omitting kind means subtitles; an invalid value means metadata.
srclang is a BCP 47 language tag, required for subtitles. label is a user-facing name and must not be empty when present. The boolean default attribute suggests enabling the track, but user preferences can take precedence. For one media element, at most one track from the combined subtitles and captions group may have default.
In the DOM, element.track exposes a TextTrack object, not an HTML element. The example reads its properties without playing media; it does not test cue loading or caption display.
Examples
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>Track inspection</title>
<video>
<track id="captions" kind="captions" srclang="en" label="English" src="data:text/vtt,WEBVTT%0A%0A00%3A00%3A00.000%20--%3E%2000%3A00%3A02.000%0AHello.%0A">
</video>
<pre id="result"></pre>
<script>
const element = document.getElementById('captions');
document.getElementById('result').textContent = [
element.tagName,
element.track.kind,
element.track.language,
element.track.label
].join(' | ');
</script>
</html>Result
TRACK | captions | en | English
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.