HTML srclang Attribute
Example
<video width="340" height="260" controls playsinline>
<source src="demo/video.mp4" type="video/mp4">
<source src="demo/video.webm" type="video/webm">
<track src="demo/ensubtitle.vtt" kind="subtitles" srclang="en" label="English">
<track src="demo/frsubtitle.vtt" kind="subtitles" srclang="fr" label="French">
Your browser does not support the video tag.
</video>
Meaning
The srclang attribute specifies the language of the track text data. If the kind attribute is set to subtitles, then srclang must be defined.
Standard Syntax
<element srclang="languageCode">
Browser Support
Status
Applies to:
The srclang attribute can be used on the following element:
Attribute Values
Value | Description |
---|---|
languageCode | Specifies the language of the track (a two-letter language code). |