HTML <track> default 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" default>
<track src="frsubtitle.vtt" kind="subtitles" srclang="fr" label="French">
Your browser does not support the video tag.
</video>
Meaning
The default attribute specifies that the track should be enabled unless the user's preferences indicate that another track is more appropriate. This may only be used on one track element per media element.
Standard Syntax
HTML: <track src="URL" default>
XHTML: <track src="URL" default="default" />
Advertisement
Attribute Values
| Value | Description |
|---|---|
| default | This is a boolean attribute, the presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value. |