- <track> tag is used for defining subtitles, captions and other content for audio and video tags.
- <track> tag is particularly specifying text track for media tags.
- It supports Global and event attributes.
Syntax for <track> tag:
Differences between HTML 4.01 and HTML5 for <track> tag
- HTML4 does not supports <track> tag.
- The track tag is new to HTML5.
Sample Coding for <track> tag:
Code Explanation for <track> tag:
- <video> tag will display the movie clips or any other video file.
- <source> tag is given for the file path of the video file.
- <track> tag is defined the subtitles for the video file.
- “src” attribute used to define the location of the track file.
- “kind” attribute is used to specifies the file as “subtitles”.
- The “srclang” attribute specifies the language of the track text data as “en”.
- The “label” attribute used to specify the title of the track file as “english”.
Browser Support for <track> tag:
Related Searches to track tag in html
html5 video track
track tag in html5
html5 video caption example
track in html5
html5 video track example
html5 audio track
html5 track example