You are here : htmlHTML 5track

<track> - HTML 5

The <track> tag specifies text tracks for media elements (<audio> and <video>).

This element is used to specify subtitles, caption files or other files containing text, that should be visible when the media is playing.


Syntax

    <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>


Example

    <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>


Output / Return Value


Limitations


Alternatives / See Also


Reference