HTML <track> default Attribute

Definition and Usage

default The attribute is a boolean attribute.

When present, it specifies that the track should be enabled if the user's preferences do not indicate that another track is more suitable.

Note:Each media element can only have one setting default The <track> element attribute.

Example

A video with two subtitle tracks. The default is "English" subtitles:

<video width="320" height="240" controls>
  <source src="forrest_gump.mp4" type="video/mp4">
  <source src="forrest_gump.ogg" type="video/ogg">
  <track src="fgsubtitles_en.vtt" kind="subtitles" srclang="en" label="English" default>
  <track src="fgsubtitles_no.vtt" kind="subtitles" srclang="no" label="Norwegian">
</video>

Syntax

<track src="subtitles_en.vtt" default>

Browser Support

The numbers in the table indicate the first browser version to fully support this property.

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
23.0 10.0 31.0 6.0 12.1