HTML TRACK <track> Tag
0 1955
The HTML TRACK <track> tag define text tracks for media elements like <audio> and <video> tag. The TRACK Element used to define subtitles, captions, descriptions, chapters, or metadata for either an audio or video tag.
The TRACK Element used to specify subtitles, caption files, or other files containing text that is visible when the media file is played.
The <track> tag supports default, kind, label, src, srclang attributes, and the <track> tag also supports the Event Attributes, Global Attributes in HTML.
Program:
<!DOCTYPE HTML> <html> <head> <title>Track Tag</title> </head> <body> <h2>Example of Track Tag</h2> <video width="500" height="375" controls="controls"> <source src="sample_video.mp4" type="video/mp4" /> <source src="your ogg media file name" type="video/ogg" /> <track src="subtitles_en.vtt" kind="subtitles" srclang="en" label="English"> <track src="subtitles_hi.vtt" kind="subtitles" srclang="hi" label="Hindi"> Your browser does not support the video tag. </video> </body> </html>
Output:
Share:
Comments
Waiting for your comments