The default attribute is a boolean attribute on the <track> element. It tells the browser which text track (subtitles, captions, or other timed text) should be enabled by default on a <video> or <audio> element, unless the user chooses another track. It is not used for form default values.
01
track Element
Where default applies.
02
Boolean
Presence = enabled.
03
Subtitles
Default language track.
04
One Per Kind
Single default rule.
05
JavaScript
track.default property.
06
Not for Forms
Use value, checked.
Fundamentals
Purpose of default
When a video or audio element has multiple <track> elements (for example English and Spanish subtitles), the default attribute marks which track the browser should enable when the page loads, if the user’s preferences do not indicate another track is more appropriate.
This helps viewers see captions or subtitles immediately without opening the player menu first. It is especially important for accessibility when you provide multiple language options or both captions and subtitles.
⚠️
Not for form fields
Some older tutorials incorrectly show default="JohnDoe" on <input> elements. That is invalid HTML. For forms, use value, checked, and selected instead.
Foundation
📝 Syntax
Add default to the <track> element that should load first:
The default property mirrors the boolean attribute. Set it on one track and clear it on others when switching the preferred subtitle language programmatically.
Form Defaults — Use the Right Attributes
For form controls, use standard attributes instead of the non-existent default attribute on inputs:
HTML never defined default for form fields. The default attribute name is reserved for text tracks on media elements only.
A11y
♿ Accessibility & UX
Enable captions by default — Use default on a captions or subtitles track so deaf and hard-of-hearing users see text immediately.
Match user language — Prefer the track that matches the page language or offer multiple labeled tracks.
One default per kind — Avoid marking multiple tracks as default for the same kind; browsers may behave unpredictably.
Provide kind and label — Clear label text (e.g. “English”, “Español”) helps users pick tracks in the player menu.
Do not rely on autoplay alone — Default tracks work with user-controlled playback; pair with controls on video.
🧠 How default Works
1
Author adds track with default
Mark one WebVTT track as the preferred default.
Markup
2
Browser loads media
Video or audio starts; text tracks are registered.
Parse
3
Default track is enabled
Unless user prefs pick another track, default is shown.
Display
=
💬
Accessible media by default
Viewers see subtitles or captions without extra steps.
Compatibility
Browser Support
The default attribute on <track> is supported in all modern browsers that support HTML5 video and text tracks.
✓ HTML5 · Fully supported
Default text tracks in modern media
Chrome, Firefox, Safari, and Edge honor default on track elements paired with video or audio.
97%Browser support
Google Chrome23+ supported
Full support
Mozilla Firefox31+ supported
Full support
Apple Safari6+ supported
Full support
Microsoft EdgeFully supported
Full support
default on track97% supported
Bottom line: Use default confidently on text tracks in HTML5 media; test with your actual .vtt files.
Pro Tips
💡 Best Practices
✅ Do
Mark one subtitle or caption track as default for accessibility
Use clear label and srclang on every track
Serve valid WebVTT files from the same origin or use crossorigin
Test track switching in the browser player UI
Use value, checked, and selected for form defaults
❌ Don’t
Put default on input, select, or textarea elements
Mark multiple tracks of the same kind as default
Confuse default with the selected attribute on option
Forget srclang when kind is subtitles
Assume tracks work without a valid src URL
Wrap Up
Conclusion
The default attribute is a focused, useful HTML feature for media accessibility. On <track> elements it selects which timed text track loads first on video and audio. It does not set form field values.
When building accessible video, pair default with well-authored WebVTT captions or subtitles. For forms, stick to value, checked, and selected.