The HTML5 track Tag
It is quite unfortunate that the HTML5 <track> tag is not recognized in major web browsers like the Internet Explorer, Google Chrome, Safari, Opera and Firefox. However, the HTML5 <track> tag is capable of defining the succeeding track for the <audio> and <video> elements. The good news is that HTML5 <track> tag is well-matched with the Event Attributes and Global Attributes in HTML5.
The HTML <track> tag is newly incorporated in HTML5 and it has never been used in HTML4.01.
The optional attributes that can be used for HTML5 <track> tag are the following:
Attribute |
Value |
Description |
default (New) |
default |
It is mainly used by the author to be able to set the track that has to be enabled if in case the one that is selected by the user do not specify that another track has to be played |
kind (New) |
captions |
It is the key in determining the type of text track |
label (New) |
text |
It is used in putting the title of the text track |
src (New) |
URL |
This has to be placed within the document because it is the key in specifying the URL of the track file |
srclang (New) |
language_code |
It is the specific language that is used for the track text data. It is required only if kind="subtitles" |