HTML Videos


Go to main Page

Video in HTML

To insert video in an HTML document we use <video></video> element.

In audio tag we have to use <control> attribute to control play,pause and volume.

For best result video you have to add width and height attributes.

In audio tag we have to use <source> attribute to provide browser a source.

Example

<video width="320" height="240" controls>
    <source src="https://player.vimeo.com/external/255797028.sd.mp4?s=3df8695395389e60de086b2872e72f2c984ad84f&profile_id=164" type="video/mp4">
 
  Your browser does not support the video tag.
  </video>
  

Add autoplay to start video automatically


<video width="320" height="340" autoplay>
    <source src="https://player.vimeo.com/external/255797028.sd.mp4?s=3df8695395389e60de086b2872e72f2c984ad84f&profile_id=164" type="video/mp4">
 
  Your browser does not support the video tag.
  </video>

  

You can adjust width and height of video by using width and height attributes in video tag.