HTML sl;track sgt; label property

HTML track label property HTML

In the label, the label property is used to give the browser the title of the text track when listing available text tracks, which is readable by the consumer, refer to the following example:

Video elements 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" src
label="English">
<track src="subtitles_no.vtt" kind="subtitles" srclang="no"
label="Norwegian">
</video>

Browser support

HTML track label property HTML track label property HTML track label property HTML track label property HTML track label property

Internet Explorer 10, Opera, and Chrome label properties are supported.


Definitions and usages

The label property specifies the title of the text track.

For example, when a user selects a caption track, the title appears.


The difference between HTML 4.01 and HTML5

The label is a new HTML5 label.


Grammar

<track src="subtitles_en.vtt" kind="subtitles" src label="English">

The property value

value describe
label Specify the title of the track.


HTML track label property HTML