
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
How to add text tracks used in media players in HTML5?
Use the <track> tag in HTML5 to add text tracks used in media players. You can try to run the following code to learn how to add text tracks used in media players in HTML5 −
Example
<!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 Articles
- How to add an article in HTML5?
- How to create a link with media attribute in HTML5
- How to define media type of style tag in HTML5?
- How to define the type of media resource in HTML5?
- How to display text ruby annotation in HTML5?
- What are some of the best media players in the market?
- How to handle HTML5 media events using jQuery?
- How to add controls to an audio in HTML5?
- How to draw a text with fillText() in HTML5?
- How to draw a text with strokeText() in HTML5?
- How to add preformatted text in HTML?
- How to add a date and time in HTML5?
- How to add various fonts to text using text flow in JavaFX?
- How to add line height to multiline text in Text using FabricJS?
- How to define important text using HTML5?

Advertisements