Fandom

HTML & CSS Wiki

Track

649pages on
this wiki
Add New Page
Comments0 Share


The void HTML <track /> element allows authors to specify explicit external timed tracks for media elements. It does not represent anything on its own. It was introduced in HTML5.

Attributes

Attribute Value Description
kind subtitles
captions
descriptions
chapters
metadata
An enumerated attribute. This an optional attribute which is used to indicate what kind of keyword is used in the media element.
src URL Gives the address of the timed track data. The value must be a valid non-empty URL potentially surrounded by spaces. This attribute is required.
srclang lang Gives the language of the timed track data. The value must be a valid BCP 47 language tag. This attribute must be present if the kind attribute is in the subtitles state.
label name Gives a user-readable title for the track. This title is used by user agents when listing subtitle, caption, and audio description tracks in their user interface. The value, if the attribute is present, must not be an empty string. Furthermore, there must not be two <track> element children of the same media element whose kind attributes are in the same state, whose srclang attributes are both missing or have values that represent the same language, and whose label attributes are again both missing or both have the same value.


HTML example:

<video src="brave.webm">
 <track kind="subtitles" src="brave.en.srt" srclang="en" label="English">
 <track kind="captions" src="brave.en.srt" srclang="en" label="English for the Hard of Hearing">
 <track kind="subtitles" src="brave.fr.srt" srclang="fr" label="Français">
 <track kind="subtitles" src="brave.de.srt" srclang="de" label="Deutsch">
</video>

External Links

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.