Menu

Video Embedding

Video Embedding

The video tag works almost exactly like audio, but for video files. You can control its size using width and height attributes.

As with audio, adding the controls attribute gives visitors play and pause buttons, plus a way to adjust volume and go fullscreen.

<video width="640" height="360" controls>

  <source src="clip.mp4" type="video/mp4">

  Your browser does not support the video tag.

</video>

Explanation: You can list multiple source tags with different file formats inside one video tag. The browser picks the first format it understands and skips the rest, which helps with cross-browser compatibility.

The fallback text ("Your browser does not support the video tag.") only gets displayed if the browser can't render the video tag at all, which is rare today but still good practice.


HTML Tutorial (From Basics to Implementation)

AP

Abhishek Pati





Get in Touch For Details