HTML - attributes - label

revision:


Content

"label" attribute : specifies the title of the text track syntax some examples


"label" attribute : specifies the title of the text track

top

The title of the text track is used by the browser when listing available text tracks. The label attribute can be used on the <track> element, as well as on the ><option> and ><optgroup> elements.


syntax

top

<track src=" " kind="" srclang=" " label=" ">


some examples

top

no video available

codes:
                    <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>
                
codes:
                    <form style="margin-left:5vw;" name="Fav_Sport" >
                        <label>Favorite sports </label>
                        <select name="favoritesports" id="favoritesports">
                            <optgroup label="Sports">
                                <option label="Soccer">Soccer</option>
                                <option label="Hockey">Hockey</option>
                                <option label="Tennis">Tennis</option>
                                <option label="Golf">Golf</option>
                            </optgroup>
                        </select>
                    </form>