The best HTML <track> tag Tutorial In 2024, In this tutorial you can learn Examples,Browser Support,Tag definitions and instructions,Differences between HTML 4.01 and HTML5,Optional attributes,Global Properties,Event Properties,
With two subtitle tracks Video:
IE 10, Opera and Chrome browsers support <track> tag.
<Track> tag for the media element (such as <audio> and <video>) specified external text track.
This element is used to specify the subtitle files or other files that contain text, and when the media player, these files are visible.
<Track> tag is new in HTML5 tags.
New: HTML5 new property.
属性 | 值 | 描述 |
---|---|---|
default New | default | 规定该轨道是默认的。如果用户没有选择任何轨道,则使用默认轨道。 |
kind New | captions chapters descriptions metadata subtitles |
规定文本轨道的文本类型。 |
label New | text | 规定文本轨道的标签和标题。 |
src New | URL | 必需的。规定轨道文件的 URL。 |
srclang New | language_code | 规定轨道文本数据的语言。如果 kind 属性值是 "subtitles",则该属性是必需的。 |
<track> tag supports HTML global properties .
<track> tag supports HTML event properties .