title: How to add subtitles to a video in html?
body: <p>I tried using the <code>track</code> element, but it didn't work..could you please tell me if there's something I am doing wrong?</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;video controls="controls" id="video1" width="450"&gt;
      &lt;source src="A taste of TED.mp4" type="video/mp4"&gt;
      &lt;track src="TED.vtt" kind="subtitles" srclang="en" label="English"&gt;
   &lt;/video&gt;
  </code></pre>
  
  <p>The subtitle file (<code>TED.vtt</code>) looks like this:</p>
  
  <pre><code>WEBVTT
  
  1
  00:00:01.000 --&gt; 00:00:10.000
  This is the first line of text, displaying from 1-10 seconds
  
  2
  00:00:15.000 --&gt; 00:00:20.000
  And the second line of text
  separated over two lines
  </code></pre>