<video>

<video>

  • To show a video in HTML, use the <video> element.
  • Before HTML5, a video could only be played in a browser with a plug-in (like flash).
  • The HTML5 <video> element specifies a standard way to embed a video in a web page.
  • In HTML5, there are 3 supported video formats: MP4, WebM, and Ogg.

Demonstration code

<video width="320" height="240" controls>
  <source src="movie.mp4" type="video/mp4">
  <source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>

Demonstration code

//to start a video automatically use the autoplay attribute

<video width="320" height="240" autoplay>
  <source src="movie.mp4" type="video/mp4">
  <source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>

<video> — Structure map

Clickable & Draggable!

<video> — Related pages: