Last Updated : 12 Jul, 2025
The HTML label Attribute is used to specify the title of the Text Track. The title of the Text Track is used by the browser when listing available text tracks. It is used in <track> element.
Syntax:
<track label="English">
HTML label Attribute Supported Tags:
HTML label Attribute ExampleExample: Here is the basic implementation of HTML label Attribute.
HTML
<!DOCTYPE html>
<html>
<head>
<style>
body {
text-align: center;
}
h1 {
color: green;
}
</style>
</head>
<body>
<h1>GeeksforGeeks</h1>
<h2>HTML label Attribute</h2>
<video width="100"
height="100"
controls>
<track src=
"https://write.geeksforgeeks.org/wp-content/uploads/11.mp4"
id="myTrack1"
kind="subtitles"
srclang="en"
label="English"
default>
<source id="myTrack"
src=
"https://write.geeksforgeeks.org/wp-content/uploads/11.mp4"
type="video/mp4">
</video>
</body>
</html>
Output:
Explanation:
The label attribute in HTML is used to provide a text label or description for an element, such as an input field or a form control, improving accessibility and user experience.
Supported BrowsersThe browsers supported by label Attribute are listed below:
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