HTML Video

Video Link

  • <video> element used to embed the video¬†file in web page.
  • <source> element used to add alternate audio files in HTML
  • Controls elememt used for adding video controls(like start,stop,mute,resume
Program on Video Link

<!DOCTYPE html>
<html>
<body>

<video width=”320″ height=”240″ controls>
<source src=”video.mp4” type=”video/mp4″>
<source src=”mov_bbb.ogg” type=”video/ogg”>
</video>

</body>
</html>

Output

 

<video> Autoplay

To play a  video automatically you can use the autoplay attribute

Program on Video Autoplay

<!DOCTYPE html>
<html>
<body>

<video width=”320″ height=”240″ autoplay>
<source src=”video.mp4″ type=”video/mp4″>
<source src=”mov_bbb.ogg” type=”video/ogg”>
</video>

</body>
</html>

Output

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *