HTML Attributes
HTML srclang attribute
Declares the language of a text track. It is required for subtitle tracks; use a clear label to help users select the track. Applicable elements include: <track>. Check each element’s value rules. Example uses illustrative URLs or local assets; provide the corresponding files or application endpoints when running it.
Formal Syntax & Structure
html syntaxhtml
srclang="en"Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| srclang | BCP 47 language tag | Declares the language of a text track. It is required for subtitle tracks; use a clear label to help users select the track. |
Working Example
Example Snippethtml
<video src="lesson.mp4" controls> <track kind="subtitles" src="en.vtt" srclang="en" label="English"></video>