👀 Live Preview
Video with an English subtitle track. Enable captions from the player menu:
Tip: Open the caption/subtitle menu in the video controls to toggle tracks.

The <track> tag adds subtitles, captions, and other timed text to <video> and <audio>. This guide covers syntax, WebVTT files, key attributes, accessibility, and best practices for beginners.
Void element inside media tags.
Timed text in .vtt format.
Subtitles, captions, chapters.
srclang and label for menus.
Inclusive video for all viewers.
Clear labels and tested tracks.
<track> Tag?The track element (<track>) adds timed text tracks to <audio> and <video> elements. It provides supplementary text such as subtitles, captions, or descriptions to improve understanding and accessibility of multimedia content.
Captions help deaf and hard-of-hearing viewers. Subtitles reach global audiences. Both are added with a <track> element pointing to a WebVTT file.
The track element is a void element—it has no closing tag and no visible content of its own. Browsers read the referenced .vtt file and display timed text over the video or alongside audio controls.
Place <track> inside <video> or <audio>, typically after <source> elements:
<video controls>
<source src="video.mp4" type="video/mp4">
<track kind="captions" src="captions_en.vtt" srclang="en" label="English">
</video><track> is a void element—no closing tag required.<video> or <audio>.src attribute points to a WebVTT (.vtt) text track file.kind, srclang, and label so browsers can list tracks in the caption menu.default on one track to enable it when the media loads.| Attribute | Example | Purpose |
|---|---|---|
kind | subtitles, captions | Type of text track |
src | /video/count.vtt | WebVTT file URL |
srclang | en, es | Track language (BCP 47) |
label | English | User-visible menu name |
default | Boolean | Enable this track by default |
| Parent | video or audio | Media element only |
kind Attribute Values| kind Value | Purpose | Visible? |
|---|---|---|
subtitles | Translation of dialogue for viewers who can hear audio | Yes |
captions | Dialogue + sound effects for deaf/hard-of-hearing viewers | Yes |
descriptions | Audio descriptions of visual content for blind viewers | Via screen reader |
chapters | Chapter titles for navigation | In chapter menu |
metadata | Data for scripts (not shown to users) | No |
| Feature | Subtitles (kind="subtitles") | Captions (kind="captions") |
|---|---|---|
| Target audience | Viewers who can hear but need translation | Deaf or hard-of-hearing viewers |
| Content | Spoken dialogue translation | Dialogue + sound effects, music cues |
| Example use | Foreign-language film | Educational or presentation video |
Text tracks use the WebVTT (.vtt) format. Each cue has a start time, end time, and text:
WEBVTT
00:00:00.000 --> 00:00:04.600
Ten, nine, eight, seven, six,
00:00:05.280 --> 00:00:09.720
five, four, three, two, one.Save files with the .vtt extension and serve them with MIME type text/vtt.
These are the key attributes on <track>:
kind RequiredType of text track: subtitles, captions, descriptions, chapters, or metadata.
kind="subtitles"src RequiredURL of the WebVTT (.vtt) text track file.
src="/video/count.vtt"srclang RecommendedLanguage of the track using a BCP 47 language tag (e.g. en, es).
srclang="en"label RecommendedUser-readable name shown in the browser’s caption/subtitle menu.
label="English"default OptionalBoolean attribute. Enables this track by default when the media loads.
default<!-- Subtitles -->
<track kind="subtitles" src="subtitles_en.vtt" srclang="en" label="English">
<!-- Captions in Spanish -->
<track kind="captions" src="captions_es.vtt" srclang="es" label="Spanish">Subtitles, captions, and multiple language tracks with copy-ready code, live previews, and hands-on practice.
Video with an English subtitle track. Enable captions from the player menu:
Tip: Open the caption/subtitle menu in the video controls to toggle tracks.
Use <track> to add subtitles for multilingual audiences, captions for accessibility, and chapter markers for long-form video navigation.
When dealing with videos in multiple languages, the <track> tag is invaluable for including subtitles. This enhances accessibility and lets a broader audience engage with your multimedia:
<video controls>
<source src="/video/count.mp4" type="video/mp4">
<track kind="subtitles" src="/video/count.vtt" srclang="en" label="English" default>
</video>For educational or presentation videos, using <track kind="captions"> can significantly improve comprehension for viewers with hearing impairments or those in noisy environments:
<video controls>
<source src="/video/count.mp4" type="video/mp4">
<track kind="captions" src="/video/count_es.vtt" srclang="es" label="Spanish">
</video>Offer several <track> elements so viewers can switch between languages from the browser’s caption menu:
<video controls>
<source src="/video/count.mp4" type="video/mp4">
<track kind="subtitles" src="/video/count.vtt" srclang="en" label="English" default>
<track kind="subtitles" src="/video/count_es.vtt" srclang="es" label="Spanish">
</video>label attribute should clearly name each language or track type.default attribute on the primary language track.A <track> inside video points to a .vtt file with timed cues.
The media element fetches the WebVTT file and parses cue start/end times.
As playback reaches each cue, the browser overlays subtitles or captions on the video.
Viewers read synced text alongside video—making content inclusive for global and deaf/hard-of-hearing audiences.
The <track> tag is supported in all modern browsers. Internet Explorer 10+ has partial support for some track features.
Chrome, Firefox, Safari, Edge, and Opera fully support WebVTT subtitles and captions on video elements.
Bottom line: Ship WebVTT tracks with confidence in all browsers your users run today.
The <track> tag is a valuable tool for making multimedia content more accessible and inclusive. By incorporating captions and subtitles with WebVTT files, you significantly improve the user experience for a diverse audience.
.vtt) files for all text trackslabel values for each trackdefault on the primary language track<track> outside video or audiosrclang on multilingual tracks<track>Bookmark these before you publish your next video.
<track> adds timed subtitles, captions, and descriptions to media.
Store timed cues in .vtt files referenced by src.
Declare track type and language for the caption menu.
AttributesCaptions make video usable for deaf and hard-of-hearing viewers.
A11yAlways nest track inside video or audio.
<track> element adds timed text tracks—subtitles, captions, descriptions, or chapters—to <video> or <audio> using WebVTT files..vtt) is the standard format. Each file contains timed text cues with start and end timestamps.<video> or <audio>, alongside <source> elements.default boolean attribute marks one track as enabled when the media element loads. Only one track per media element should have default.Practice <track> with WebVTT files in the Try It editor.
5 people found this page helpful