Basic HTML

Advance HTML

HTML Tags Reference

HTML Code Generator


HTML <track> Tag


HTML <track> tag specifies a subtitles, descriptions, chapters, metadata, captions that surrounding to <video> or <audio> tag.

HTML <track> tag introduce in HTML5.


Example-Code:

<video controls>
  	<source src="rolling_sample.mp4" type="video/mp4">
  	<track src="rolling_sample.vtt" label="English subtitles" 
    		kind="subtitles" srclang="en" default >
  	<track src="rolling_sample.vtt" label="Hindi subtitles" 
    		kind="subtitles" srclang="hi" >
Display this message, if your browser does not support video tag.
</video>
Online Try This Code Your Self....   »

Example-Result:


<track> tag Attributes

<track> tag support following special attributes.

Attributes Value Description
default default Specifies track is enabled.
kind captions
chapters
descriptions
metadata
subtitles
Specifies which kind of text track
label text Specifies title of track
src URL Specifies the resource to use. Required Attributes
srclang Language_Code Specifies language of track text.
Required Attributes(If kind="subtitles")

Dynamic Attributes

<track> tag supported following Dynamic attributes.:

Attributes Value Description
id ID_Name Declared unique id for the element.
class Predefined_Class Used in Cascading Style Sheet (CSS).
style style_Attributes CSS code specify inline the HTML element is presented.
title Title_Description Display on the "tooltip" for your elements.

Event Attributes

<track> tag supported following Event attributes.:

Attributes Value Description
onfocus "Java_script" element gets focus on object when script tobe run.
onblur "Java_script" element lose the focus on object when scrip tobe run.
onabort "Java_script" element gets aborted on object when script tobe run.
onchange "Java_script" element gets anytime change on object when script tobe run.
onbeforeunload "Java_script" element gets unloaded on object when scrip tobe run.
onclick "Java_script" clicked on object when script tobe run.
ondblclick "Java_script" double click on object when script tobe run.
onkeydown "Java_script" key is pressed when script tobe run.
onkeypress "Java_script" key is pressed over element then released when script tobe run.
onkeyup "Java_script" key is released over element when script tobe run.
onmousedown "Java_script" mouse button was pressed over an element when script tobe run.
onmouseout "Java_script" mouse pointer release over an element when script tobe run.
onmousemove "Java_script" run mouse pointer moved when script tobe run.
onmouseover "Java_script" run mouse pointer move over when script tobe run.
onmouseup "Java_script" mouse button is released when script tobe run.
onreset "Java_script" form has been reset when script tobe run.
onselect "Java_script" Select some content when script tobe run.
onsubmit "Java_script" form has been submitted when script tobe run.
onload "Java_script" object has load when script tobe run.
onchange "Java_script" allow to change the object when script tobe run.
onunload "Java_script" unload to the browser window when script tobe run.
ondrag "Java_script" element being dragged when script tobe run.
ondragend "Java_script" element being stop dragged when script tobe run.
ondragenter "Java_script" element being go target dragged when script tobe run.
ondragleave "Java_script" element being leave to target dragged when script tobe run.
ondragover "Java_script" element being over to target dragged when script tobe run.
ondragstart "Java_script" element being start dragged when script tobe run.
ondrop "Java_script" element being dropped when script tobe run.
onerror "Java_script" element error occurs when script tobe run.
onmessage "Java_script" element message display when script tobe run.
onerror "Java_script" element error occurs when script tobe run.
onmousewheel "Java_script" mouse wheel will be rotate when script tobe run.
onscroll "Java_script" scrollbar is scroll when script tobe run.
onresize "Java_script" element should be resize when script tobe run.
onselect "Java_script" all element content selected when script tobe run.
onstorage "Java_script" element should be store in target when script tobe run.