HTML <track> src Attribute

❮ HTML <track> tag

Example

<video width="340" height="260" controls playsinline>
  <source src="video.mp4" type="video/mp4">
  <source src="video.webm" type="video/webm">
  <track src="ensubtitle.vtt" kind="subtitles" srclang="en" label="English">
  <track src="frsubtitle.vtt" kind="subtitles" srclang="fr" label="French">
  Your browser does not support the video tag.
</video>

Meaning

The src attribute specifies address of the track .vtt file extension only allowed. Must be a valid URL. This attribute must be specified and its URL value must have the same origin as the document — unless the <audio> or <video> parent element of the track element has a crossorigin and crossorigin attribute.


Standard Syntax

HTML: <track src="URL">

XHTML: <track src="URL" />



Browser Support




Status







Attribute Values

Value Description
URL

Value can be

  • An absolute URL - source within or another web site ( href="http://www.example.com/index.html")
  • A relative URL - source within a web site ( href="index.html")
❮ HTML <track> tag