Using video and audio element to display audiovideo content

suggest change

Use the HTML or <audio> element to embed video/audio content in a document. The video/audio element contains one or more video/audio sources. To specify a source, use either the src attribute or the <source> element; the browser will choose the most suitable one.

Audio tag example:

<!-- Simple video example -->
<video src="videofile.webm" autoplay poster="posterimage.jpg">
  Sorry, your browser doesn't support embedded videos, 
  but don't worry, you can <a href="videofile.webm">download it</a>
  and watch it with your favorite video player!

<!-- Video with subtitles -->
<video src="foo.webm">
  <track kind="subtitles" src="foo.en.vtt" srclang="en" label="English">
  <track kind="subtitles" src="" srclang="sv" label="Svenska">
<!-- Simple video example -->
<video width="480" controls poster="" >
  <source src="" type="video/webm">
  <source src="" type="video/mp4">
  <source src="" type="video/ogg">
  Your browser doesn't support HTML5 video tag.

Audio tag example:

<!-- Simple audio playback -->
<audio src="" autoplay>
  Your browser does not support the <code>audio</code> element.

<!-- Audio playback with captions -->
<audio src="foo.ogg">
  <track kind="captions" src="foo.en.vtt" srclang="en" label="English">
  <track kind="captions" src="" srclang="sv" label="Svenska">

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents