CKTIS / HTML
default: a preferred text track
Suggest an initial track while respecting the user’s track preferences.
Version: HTML Living Standard
Syntax
<track kind="captions" srclang="en" src="/captions.vtt" default>The boolean default attribute belongs to a text-track element inside media. It suggests enabling that track when the user has not expressed a more suitable preference. Presence matters; a textual false value does not disable it. This is not a general attribute for default form values or selected options.
For one media element, allow at most one default across subtitles and captions, one for descriptions and one for chapters; metadata tracks are not limited in the same way. Supply valid track kind, language information where required and a readable WebVTT resource. The default suggestion does not guarantee what every user sees.
The isolated English-language browser loads one default caption track. Its mode becomes showing and one real cue is parsed. No script forces the track mode, so the result records the browser’s initial choice in this profile, not all language preferences.
Examples
<!doctype html><meta charset="utf-8">
<video id="video" controls muted><track id="captions" kind="captions" srclang="en" label="English" src="/captions.vtt" default></video>
<output id="result"></output><script>
const track = document.querySelector('#captions');
track.addEventListener('load', () => {
document.querySelector('#result').textContent = 'mode=' + track.track.mode + '; cues=' + track.track.cues.length;
});
</script>Result
mode=showing; cues=1
The caption resource is local and its parsed cue is checked; the mode is not set by the test.