The HTML srclang attribute
Quick answer
The HTML srclang attribute declares the language of the track's text data using a BCP 47 code. It is used on the <track> element.
Overview
The srclang attribute sets the language of a media text track. It is used on the <video>, <audio>, <source> and <track> elements.
It configures native audio or video playback — the source, controls, autoplay and looping behavior, the poster image, and text tracks. It works with the <video>/<audio> elements and their nested <source> and <track> children.
Syntax
<track kind="subtitles" srclang="fr" src="fr.vtt" label="Français">
Values
| Value |
|---|
A BCP 47 language tag, e.g. en. |