A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/html/html-track-tag/ below:

HTML <track> Tag - GeeksforGeeks

HTML <track> Tag

Last Updated : 05 Aug, 2025

The <track> tag in HTML is used to specify text tracks for <video> and <audio> elements. It provides subtitles, captions, or other kinds of text metadata synchronized with the media.

Note:

html
<!DOCTYPE html>
<html>  

<body> 
    <video width="600" height="400" controls> 
        <source src=
"https://media.geeksforgeeks.org/wp-content/uploads/20231212135336/animationgif.mp4" type="video/mp4"> 
        <track src=
"https://media.geeksforgeeks.org/wp-content/uploads/20231212135336/animationgif.vtt" kind="subtitles" 
               srclang="en" label="English"> 
    </video> 
</body> 

</html>
Syntax
<track attribute>
Attributes

Attribute Values

Description

default

Specifies that, the track to enabled if the user wants to change the track.

kind

Specifies the kind of text track

label

The title of the text track

src

It is for the URL of the track file

srclang

It tells the language of the track text data (required if kind="subtitles")

Example 2: HTML
<!DOCTYPE html>
<html lang="en">

<body>
    <video width="700" height="500" controls>
        <source src="https://media.geeksforgeeks.org/wp-content/uploads/20231214153822/1.mp4" type="video/mp4">
        <track src="https://media.geeksforgeeks.org/wp-content/uploads/20231212135336/animationgif.vtt" 
               kind="subtitles" srclang="en" label="English" default>
    </video>
</body>

</html>


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4