Monday 28 August 2017

HTML 5 Video Tag

Introduction

Whenever you are trying to add a video to your html browser you can use <video> tag.

Source code :
(attention this code could only be use when you are using html5 browser)
 <video width="640" height="480" controls preload="none" poster="img/bg.jpg">
     <source src="img/video.mp4" type="video/mp4">
     Your browser does not support the video tag.
  </video>




















You can use autoplay attribute to set video autoplay whenever user open your browser. To enable control of your video you should include "controls" attribute in your <video> tag to enable play, pause and enlarge the video. To enable preview of video or otherwise it will show blank preview you could just include the url of image into the <video> tag.


References :

https://www.w3schools.com/tags/att_video_height.asp

No comments:

Post a Comment