HTML track label attribute
Examples
video element with two subtitle tracks:
<video width="320" height="240" controls>
<source src="forrest_gump.mp4" type="video/mp4">
<source src="forrest_gump.ogg" type="video/ogg">
<track src="subtitles_en.vtt" kind="subtitles" srclang="en"
label="English">
<track src="subtitles_no.vtt" kind="subtitles" srclang="no"
label="Norwegian">
</video>
<source src="forrest_gump.mp4" type="video/mp4">
<source src="forrest_gump.ogg" type="video/ogg">
<track src="subtitles_en.vtt" kind="subtitles" srclang="en"
label="English">
<track src="subtitles_no.vtt" kind="subtitles" srclang="no"
label="Norwegian">
</video>
Browser Support
Internet Explorer 10, Opera, and Chrome support the label property.
Definition and Usage
label attribute specifies the text of the title track.
For example, when the user selects a caption track, the title will be displayed.
Differences between HTML 4.01 and HTML5
<Track> tag HTML5 is the new label.
grammar
<track src="subtitles_en.vtt" kind="subtitles" srclang="en" label="English">
Property Value
值 | 描述 |
---|---|
label | 规定轨道的标题。 |
HTML <track> tag