Advertisement
Home Open Editor ❯

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>

Try this code ❯

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">


Applies to:

The srclang attribute can be used on the following element:

Element Attribute
<track> srclang

Advertisement

Attribute Values

Value Description
languageCode Specifies the language of the track (a two-letter language code).
Home Open Editor ❯
Advertisement