

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Set the language of the track text data in HTML
Use the srclang attribute to set the language of the track text data in HTML. For subtitles, use this attribute.
Example
You can try to run the following code to implement srlang attribute −
<!DOCTYPE HTML> <html> <body> <video width = "300" height = "200" controls autoplay> <source src = "/html5/foo.ogg" type = "video/ogg" /> <source src = "/html5/foo.mp4" type = "video/mp4" /> <track src = "subtitles_en.vtt" kind = "subtitles" srclang = "en" label = "English"> <track src = "subtitles_ru.vtt" kind = "subtitles" srclang = "ru" label = "Russia" default> Your browser does not support the video element. </video> </body> </html>
- Related Questions & Answers
- How to specify the kind of text track in HTML?
- How do we create the title of the text track in HTML?
- Set the language of the linked document in HTML
- Set the text wrap in a form in HTML
- HTML DOM Track Object
- Set the color of the text decoration in CSS
- Set the style of the text decoration in CSS
- Set the shape of the area in HTML
- Set the width of the element in HTML
- Set the size of the icons in HTML
- HTML DOM Track default Property
- HTML DOM Track kind Property
- HTML DOM Track label Property
- HTML DOM Track src Property
- HTML DOM Track srclang Property
Advertisements