HTML Tag: track
Timed text track, to accompany video
or audio
resources. This could take the form of subtitles, closed captions, descriptions, chapter titles, or other metadata.
track
has no content and therefore does not warrant a closing tag.
Required Attributes
Attribute | Description | Possible values |
---|---|---|
src |
The location of the text track to be used. Typically a WebVTT file. | URL. |
Optional Attributes
Attribute | Description | Possible values |
---|---|---|
kind |
How the text track should be interpreted. |
|
srclang |
Language of the text track. | Language tag, such as en (English) or fr (French). |
label |
User-accessible title for the text track. | Text. |
default |
Automatically enables the track if no user-preference suggests an alternative. | None. |
Global attributes |
Example
<audio src="mrMurray_downCameTheRain.mp3" controls>
<track src="dctr_en.vtt" srclang="en" default>
<track src="dctr_fr.vtt" srclang="de">
<track kind="metadata" src="dctr_wtf.vtt">
</audio>