HTML - tags - <track>

#140 of 147
track
Next tt
Prev tr

 <html>
 <body>
     <video controls>
         <source src="video/DonaldsDecision.mp4">
         <track kind="subtitles" label="English subtitles"
             src="video/donald_subtitles_en.vtt" srclang="en" default>
     </video>
 </body>
 </html>
 

donald_subtitles_en.vtt

The track element adds a text track (for subtitles or captions) to an audio or video element.

The track src is a text file in WebVTT format.

A live example:



N of

Ads by Google

Ask a question, send a comment, or report a problem - click here to contact me.

© Richard McGrath