×

Html & Html5

The World's best Software Development Study Portal

HTML video tag


This <video> tag is use to attach video clips such as movie clips or other video streams etc. into your website. But currently three type of file format is supported by HTML5.
These are as follows:-
  1. mp4
  2. webM
  3. ogg

Let's see how video file imports in HTML5 through an example:-



Output:




Some more attributes of HTML video tag


Attribute Description
controls It defines the video controls which is displayed with play/pause buttons.
autoplay It specifies that the video will start playing as soon as it is ready.
loop It specifies that the video file will start over again, every time when it is completed
muted It is used to mute the video output.
preload It specifies the author view to upload video file when the page loads.
poster It specifies the image which is displayed on the screen when the video is not played.
src It specifies the source URL of the video file.


\