English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag Reference

HTML: <track> src attribute

Usage of the <track> src attribute, online examples demonstrating how to use the <track> src attribute, browser compatibility, syntax definition, and detailed information about its attribute values, etc.

 HTML <track> tag

Online Example

An element with two subtitle tracks:

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

Browser compatibility

IEFirefoxOperaChromeSafari

Internet Explorer 10, Opera, and Chrome support the src attribute.

Definition and usage

The src attribute specifies the URL of the track.

HTML 4.01 and HTML5difference between

The <track> tag is an HTML5 is a new tag.

Syntax

    <track src="subtitles_en.vtt">

Attribute value

ValueDescription
URLSpecify the URL of the track.


 HTML <track> tag