Latest Post

How to Embed a Video in HTML

How to Embed a Video in HTML


How to Embed a Video in HTML

In HTML5, you can embed a video in your Website using a pair of <video> tags. It is also mandatory to define the <source> Tags for the video.

<video width="400" height="300">
  <source src="Enter-Your-Video-Path.mp4" type="video/mp4">
  <source src="Enter-Your-Video-Path.webm" type="video/webm">
  <source src="Enter-Your-Video-Path.ogg" type="video/ogg">
  Video tag is not supported in this browser.
</video>

1. Add Height And Width

<video width="400" height="300">
     <source src="Enter-Your-Video-Path.mp4" type="video/mp4">
</video>

2. Add Fullscreen

<video width="100%" height="300">
    <source src="Enter-Your-Video-Path.mp4" type="video/mp4">
</video>

3. Add Video Player Controls

<video controls="controls" width="100%" height="300">
    <source src="Enter-Your-Video-Path.mp4" type="video/mp4">
</video>

4. Add Image Your Video

<video poster="Enter-Your-Image-Path" controls="controls" width="100%" height="300">
    <source src="Enter-Your-Video-Path.mp4" type="video/mp4">
</video>

5. Add Video Autoplay

<video poster="Enter-Your-Image-Path" autoplay="autoplay" controls="controls" width="100%" height="300">
    <source src="Enter-Your-Video-Path.mp4" type="video/mp4">
</video>

6. Add Video Looping

<video poster="Enter-Your-Image-Path" loop="loop" autoplay="autoplay" controls="controls" width="100%" height="300">
    <source src="Enter-Your-Video-Path.mp4" type="video/mp4">
</video>

No comments