HTML Videos

In Html, Videos can be shown by using the video element. The Video element requires the source from where it has to show the video and show different attributes to properly show the video.

Showing a video,

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

Different attributes are needed to properly show the video, These attributes are width, height, and controls. The controls attribute adds the controls to the video player.

The source element is used to add the source file to the video element, it is done by adding the path or the file name of the video file and the type attribute is added to mention the file type.